Hey,

what kind of load do you have? Puppet? Facter? Is that ENC? Something else?

Can you tell which requests are slow from logs or monitoring?

LZ

On Fri, Sep 15, 2017 at 3:35 AM, 'Konstantin Orekhov' via Foreman
users <[email protected]> wrote:
>
> Hi, all!
>
> Under increased load (which comes in spikes), I noticed lots of mysql
> deadlock errors resulting in failed transactions and incorrectly discovered
> systems (duplicate and/or empty entries in discovered_hosts I reported in
> this group some time ago, just can't find those posts for some reason).
>
> Anyway, these are the type of messages I receive:
>
> 2017-09-14 15:01:13 173c1d40 [app] [E] Fact processor37 could not be
> imported because of Mysql2::Error: Deadlock found when trying to get lock;
> try restarting transaction: SELECT  1 AS one FROM `fact_values` WHERE
> (`fact_values`.`fact_name_id` = BINARY 248 AND `fact_values`.`host_id` =
> 446074) LIMIT 1
> 2017-09-14 15:01:14 173c1d40 [audit] [I] [mac90e2bae93da0] added 353
> (2693.0ms)
> 2017-09-14 15:01:14 173c1d40 [app] [W] Error during fact import for
> mac90e2bae93da0
>  | ActiveRecord::StatementInvalid: Mysql2::Error: Deadlock found when trying
> to get lock; try restarting transaction: SELECT  1 AS one FROM `fact_values`
> WHERE (`fact_values`.`fact_name_id` = BINARY 248 AND `fact_values`.`host_id`
> = 446074) LIMIT 1
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in
> `_query'
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in
> `block in query'
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in
> `handle_interrupt'
>  |
> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in
> `query'
> <snip>
>
> I do run an active/active cluster of 3 1.14.x Foreman VMs with replicated
> MariaDB Mysql backend.
>
> I saw a couple of people were the same questions in the IRC chat, but I
> could not find any responses to that over there.
>
> Anyone has any suggestions/recommendations? Anything like
> https://github.com/qertoip/transaction_retry is planned to be used instead
> of failing transactions in Foreman?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/d/optout.



-- 
Later,
  Lukas @lzap Zapletal

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to