Katello3.0RC3 - Registering a host takes minutes and the web ui is not responding

Hello,

I am currently trying to add hosts on my Katello3.0 RC3 instance.

Each host takes several minutes to be added and the Katello web UI is not
responding during this time.

Is there any parameter I can tune to not block the web UI or make the
registration faster ?

2016-04-21 18:01:02 [app] [I] Started POST
"/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
172.17.0.110 at 2016-04-21 18:01:02 +0200
2016-04-21 18:01:02 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-04-21 18:01:02 [app] [I] Parameters: {"facts"=>"[FILTERED]",
"contentTags"=>nil, "type"=>"system", "name"=>"30404e7d296c",
"owner"=>"Default_Organization", "activation_keys"=>"my-key"}
2016-04-21 18:01:03 [app] [I] Import facts for '30404e7d296c' completed.
Added: 76, Updated: 0, Deleted 0 facts
2016-04-21 18:02:20 [app] [I] Completed 200 OK in 244429ms (Views: 1.7ms |
ActiveRecord: 157689.1ms)

Kind regards
Romain

You can increase the number of Passenger workers, but it would quickly
be exhausted if registrations are taking that long.

Can you try the following?

  • edit /var/lib/pgsql/data/postgresql.conf and edit:

#log_min_duration_statement = -1

to say:

log_min_duration_statement = 500

This will log every SQL query that is taking longer than 1/2 second.

  • reload postgresql (no need to restart, just "service postgresql reload")

  • perform a host registration

  • check /var/lib/pgsql/data/pg_log/postgresql-<day of week>.log

I am guessing there will be at least one slow query in there. If you can
post back with the log from when that ran, we can look into this issue
further.

Thanks!

··· On 04/21/2016 12:09 PM, Romain P wrote: > Hello, > > I am currently trying to add hosts on my Katello3.0 RC3 instance. > > Each host takes several minutes to be added and the Katello web UI is not > responding during this time. > > Is there any parameter I can tune to not block the web UI or make the > registration faster ? > > 2016-04-21 18:01:02 [app] [I] Started POST > "/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for > 172.17.0.110 at 2016-04-21 18:01:02 +0200 > 2016-04-21 18:01:02 [app] [I] Processing by > Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON > 2016-04-21 18:01:02 [app] [I] Parameters: {"facts"=>"[FILTERED]", > "contentTags"=>nil, "type"=>"system", "name"=>"30404e7d296c", > "owner"=>"Default_Organization", "activation_keys"=>"my-key"} > 2016-04-21 18:01:03 [app] [I] Import facts for '30404e7d296c' completed. > Added: 76, Updated: 0, Deleted 0 facts > 2016-04-21 18:02:20 [app] [I] Completed 200 OK in 244429ms (Views: 1.7ms | > ActiveRecord: 157689.1ms) > > Kind regards > Romain >

>
>
>> Hello,
>>
>> I am currently trying to add hosts on my Katello3.0 RC3 instance.
>>
>> Each host takes several minutes to be added and the Katello web UI is not
>> responding during this time.
>>
>> Is there any parameter I can tune to not block the web UI or make the
>> registration faster ?
>>
>> 2016-04-21 18:01:02 [app] [I] Started POST
>> "/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
>> 172.17.0.110 at 2016-04-21 18:01:02 +0200
>> 2016-04-21 18:01:02 [app] [I] Processing by
>> Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
>> 2016-04-21 18:01:02 [app] [I] Parameters: {"facts"=>"[FILTERED]",
>> "contentTags"=>nil, "type"=>"system", "name"=>"30404e7d296c",
>> "owner"=>"Default_Organization", "activation_keys"=>"my-key"}
>> 2016-04-21 18:01:03 [app] [I] Import facts for '30404e7d296c' completed.
>> Added: 76, Updated: 0, Deleted 0 facts
>> 2016-04-21 18:02:20 [app] [I] Completed 200 OK in 244429ms (Views: 1.7ms |
>> ActiveRecord: 157689.1ms)
>>
>> Kind regards
>> Romain
>>

Whoops sorry, I misread the API call originally. The below instructions
may not catch the issue:)

Can you post back with the output of /var/log/candlepin/candlepin.log
from around the time you added the host?

··· On 04/21/2016 12:20 PM, Chris Duryee wrote: > On 04/21/2016 12:09 PM, Romain P wrote:

You can increase the number of Passenger workers, but it would quickly
be exhausted if registrations are taking that long.

Can you try the following?

  • edit /var/lib/pgsql/data/postgresql.conf and edit:

#log_min_duration_statement = -1

to say:

log_min_duration_statement = 500

This will log every SQL query that is taking longer than 1/2 second.

  • reload postgresql (no need to restart, just “service postgresql reload”)

  • perform a host registration

  • check /var/lib/pgsql/data/pg_log/postgresql-.log

I am guessing there will be at least one slow query in there. If you can
post back with the log from when that ran, we can look into this issue
further.

Thanks!

Thank you Chris

It seems to be an issue with the SQL query : UPDATE "architectures" SET
"hosts_count" = COALESCE("hosts_count", 0) + 1 WHERE "architectures"."id" =
1

Waou, it takes 307s.

I also display the logs of candlepin, but found nothing else.

2016-04-22 09:35:43 [app] [I] Started POST
"/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
172.17.0.126 at 2016-04-22 09:35:43 +0200
2016-04-22 09:35:43 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-04-22 09:35:43 [app] [I] Parameters: {"facts"=>"[FILTERED]",
"contentTags"=>nil, "type"=>"system", "name"=>"a6f5bddaec84",
"owner"=>"Default_Organization", "activation_keys"=>"my-key"}
2016-04-22 09:35:44 [app] [I] Import facts for 'a6f5bddaec84' completed.
Added: 76, Updated: 0, Deleted 0 facts
2016-04-22 09:36:58,000 [thread=http-bio-8443-exec-10]
[req=a8b4f0c9-b4ff-4df1-96e3-204ec367bf31, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/activation_keys/8a80828f5418e6a50154190826db0009
2016-04-22 09:36:58,031 [thread=http-bio-8443-exec-10]
[req=a8b4f0c9-b4ff-4df1-96e3-204ec367bf31, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type="application/json", time=32
2016-04-22 09:36:58,130 [thread=http-bio-8443-exec-6]
[req=1218d92b-935f-4bc4-b627-aa92f07b2fdc, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/status
2016-04-22 09:36:58,135 [thread=http-bio-8443-exec-6]
[req=1218d92b-935f-4bc4-b627-aa92f07b2fdc, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type="application/json", time=4
2016-04-22 09:36:58,169 [thread=http-bio-8443-exec-5]
[req=9d4b4133-e96d-4bbd-aa35-42fea66f2df7, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/status
2016-04-22 09:36:58,171 [thread=http-bio-8443-exec-5]
[req=9d4b4133-e96d-4bbd-aa35-42fea66f2df7, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type="application/json", time=2
2016-04-22 09:36:58,253 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=POST,
uri=/candlepin/environments/7-4/consumers/?activation_keys=9b2ef4c8-c8a7-4540-a379-f80a67012fbf
2016-04-22 09:37:00,124 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.policy.js.autobind.AutobindRules - No pools available to
rules for products: []
2016-04-22 09:37:00,124 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.controller.CandlepinPoolManager - No entitlements available
for products: []
2016-04-22 09:37:00,133 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.resource.ConsumerResource - Consumer
a3569c27-09e8-45a4-9285-aefe7029c9a5 created in org Default_Organization
2016-04-22 09:37:00,139 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.audit.HornetqEventDispatcher - Sending event: Event
[id=null, target=CONSUMER, type=CREATED, time=Fri Apr 22 09:36:59 CEST
2016, entity=ff80808154398a2c01543ce67ab600a4]
2016-04-22 09:37:00,148 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.audit.HornetqEventDispatcher - Sending event: Event
[id=null, target=COMPLIANCE, type=CREATED, time=Fri Apr 22 09:37:00 CEST
2016, entity=ff80808154398a2c01543ce67ab600a4]
2016-04-22 09:37:00,156 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type="application/json", time=1903
LOG: duration: 307950.035 ms execute <unnamed>: UPDATE "architectures"
SET "hosts_count" = COALESCE("hosts_count", 0) + 1 WHERE
"architectures"."id" = 1

2016-04-22 09:37:00,629 [thread=http-bio-8443-exec-4]
[req=6627eb58-c365-448c-add1-18e964f9a39d, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/consumers/a3569c27-09e8-45a4-9285-aefe7029c9a5
2016-04-22 09:37:00,689 [thread=http-bio-8443-exec-4]
[req=6627eb58-c365-448c-add1-18e964f9a39d, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type="application/json", time=61
2016-04-22 09:37:00,887 [thread=http-bio-8443-exec-9]
[req=afe64765-f0ac-498c-b729-6b2feaa33a4d, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/consumers/a3569c27-09e8-45a4-9285-aefe7029c9a5
2016-04-22 09:37:00,930 [thread=http-bio-8443-exec-9]
[req=afe64765-f0ac-498c-b729-6b2feaa33a4d, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type="application/json", time=43
2016-04-22 09:37:00 [app] [I] Completed 200 OK in 386068ms (Views: 1.3ms |
ActiveRecord: 307207.3ms)

··· 2016-04-21 18:32 GMT+02:00 Chris Duryee :

On 04/21/2016 12:20 PM, Chris Duryee wrote:

On 04/21/2016 12:09 PM, Romain P wrote:

Hello,

I am currently trying to add hosts on my Katello3.0 RC3 instance.

Each host takes several minutes to be added and the Katello web UI is
not

responding during this time.

Is there any parameter I can tune to not block the web UI or make the
registration faster ?

2016-04-21 18:01:02 [app] [I] Started POST
"/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
172.17.0.110 at 2016-04-21 18:01:02 +0200
2016-04-21 18:01:02 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-04-21 18:01:02 [app] [I] Parameters: {“facts”=>"[FILTERED]",
“contentTags”=>nil, “type”=>“system”, “name”=>“30404e7d296c”,
“owner”=>“Default_Organization”, “activation_keys”=>“my-key”}
2016-04-21 18:01:03 [app] [I] Import facts for ‘30404e7d296c’ completed.
Added: 76, Updated: 0, Deleted 0 facts
2016-04-21 18:02:20 [app] [I] Completed 200 OK in 244429ms (Views:
1.7ms |

ActiveRecord: 157689.1ms)

Kind regards
Romain

Whoops sorry, I misread the API call originally. The below instructions
may not catch the issue:)

Can you post back with the output of /var/log/candlepin/candlepin.log
from around the time you added the host?

You can increase the number of Passenger workers, but it would quickly
be exhausted if registrations are taking that long.

Can you try the following?

  • edit /var/lib/pgsql/data/postgresql.conf and edit:

#log_min_duration_statement = -1

to say:

log_min_duration_statement = 500

This will log every SQL query that is taking longer than 1/2 second.

  • reload postgresql (no need to restart, just “service postgresql
    reload”)

  • perform a host registration

  • check /var/lib/pgsql/data/pg_log/postgresql-.log

I am guessing there will be at least one slow query in there. If you can
post back with the log from when that ran, we can look into this issue
further.

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 foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

> Thank you Chris
>
> It seems to be an issue with the SQL query : UPDATE "architectures" SET
> "hosts_count" = COALESCE("hosts_count", 0) + 1 WHERE "architectures"."id" =
> 1

>
> Waou, it takes 307s.

307s is a lot:) how many hosts do you have?

··· On 04/22/2016 03:53 AM, Romain P wrote:

I also display the logs of candlepin, but found nothing else.

2016-04-22 09:35:43 [app] [I] Started POST
"/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
172.17.0.126 at 2016-04-22 09:35:43 +0200
2016-04-22 09:35:43 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-04-22 09:35:43 [app] [I] Parameters: {“facts”=>"[FILTERED]",
“contentTags”=>nil, “type”=>“system”, “name”=>“a6f5bddaec84”,
“owner”=>“Default_Organization”, “activation_keys”=>“my-key”}
2016-04-22 09:35:44 [app] [I] Import facts for ‘a6f5bddaec84’ completed.
Added: 76, Updated: 0, Deleted 0 facts
2016-04-22 09:36:58,000 [thread=http-bio-8443-exec-10]
[req=a8b4f0c9-b4ff-4df1-96e3-204ec367bf31, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/activation_keys/8a80828f5418e6a50154190826db0009
2016-04-22 09:36:58,031 [thread=http-bio-8443-exec-10]
[req=a8b4f0c9-b4ff-4df1-96e3-204ec367bf31, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=32
2016-04-22 09:36:58,130 [thread=http-bio-8443-exec-6]
[req=1218d92b-935f-4bc4-b627-aa92f07b2fdc, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/status
2016-04-22 09:36:58,135 [thread=http-bio-8443-exec-6]
[req=1218d92b-935f-4bc4-b627-aa92f07b2fdc, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=4
2016-04-22 09:36:58,169 [thread=http-bio-8443-exec-5]
[req=9d4b4133-e96d-4bbd-aa35-42fea66f2df7, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/status
2016-04-22 09:36:58,171 [thread=http-bio-8443-exec-5]
[req=9d4b4133-e96d-4bbd-aa35-42fea66f2df7, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=2
2016-04-22 09:36:58,253 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=POST,
uri=/candlepin/environments/7-4/consumers/?activation_keys=9b2ef4c8-c8a7-4540-a379-f80a67012fbf
2016-04-22 09:37:00,124 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.policy.js.autobind.AutobindRules - No pools available to
rules for products: []
2016-04-22 09:37:00,124 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.controller.CandlepinPoolManager - No entitlements available
for products: []
2016-04-22 09:37:00,133 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.resource.ConsumerResource - Consumer
a3569c27-09e8-45a4-9285-aefe7029c9a5 created in org Default_Organization
2016-04-22 09:37:00,139 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.audit.HornetqEventDispatcher - Sending event: Event
[id=null, target=CONSUMER, type=CREATED, time=Fri Apr 22 09:36:59 CEST
2016, entity=ff80808154398a2c01543ce67ab600a4]
2016-04-22 09:37:00,148 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.audit.HornetqEventDispatcher - Sending event: Event
[id=null, target=COMPLIANCE, type=CREATED, time=Fri Apr 22 09:37:00 CEST
2016, entity=ff80808154398a2c01543ce67ab600a4]
2016-04-22 09:37:00,156 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=1903
LOG: duration: 307950.035 ms execute : UPDATE “architectures"
SET “hosts_count” = COALESCE(“hosts_count”, 0) + 1 WHERE
"architectures”.“id” = 1

2016-04-22 09:37:00,629 [thread=http-bio-8443-exec-4]
[req=6627eb58-c365-448c-add1-18e964f9a39d, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/consumers/a3569c27-09e8-45a4-9285-aefe7029c9a5
2016-04-22 09:37:00,689 [thread=http-bio-8443-exec-4]
[req=6627eb58-c365-448c-add1-18e964f9a39d, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=61
2016-04-22 09:37:00,887 [thread=http-bio-8443-exec-9]
[req=afe64765-f0ac-498c-b729-6b2feaa33a4d, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/consumers/a3569c27-09e8-45a4-9285-aefe7029c9a5
2016-04-22 09:37:00,930 [thread=http-bio-8443-exec-9]
[req=afe64765-f0ac-498c-b729-6b2feaa33a4d, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=43
2016-04-22 09:37:00 [app] [I] Completed 200 OK in 386068ms (Views: 1.3ms |
ActiveRecord: 307207.3ms)

2016-04-21 18:32 GMT+02:00 Chris Duryee cduryee@redhat.com:

On 04/21/2016 12:20 PM, Chris Duryee wrote:

On 04/21/2016 12:09 PM, Romain P wrote:

Hello,

I am currently trying to add hosts on my Katello3.0 RC3 instance.

Each host takes several minutes to be added and the Katello web UI is
not

responding during this time.

Is there any parameter I can tune to not block the web UI or make the
registration faster ?

2016-04-21 18:01:02 [app] [I] Started POST
"/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
172.17.0.110 at 2016-04-21 18:01:02 +0200
2016-04-21 18:01:02 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-04-21 18:01:02 [app] [I] Parameters: {“facts”=>"[FILTERED]",
“contentTags”=>nil, “type”=>“system”, “name”=>“30404e7d296c”,
“owner”=>“Default_Organization”, “activation_keys”=>“my-key”}
2016-04-21 18:01:03 [app] [I] Import facts for ‘30404e7d296c’ completed.
Added: 76, Updated: 0, Deleted 0 facts
2016-04-21 18:02:20 [app] [I] Completed 200 OK in 244429ms (Views:
1.7ms |

ActiveRecord: 157689.1ms)

Kind regards
Romain

Whoops sorry, I misread the API call originally. The below instructions
may not catch the issue:)

Can you post back with the output of /var/log/candlepin/candlepin.log
from around the time you added the host?

You can increase the number of Passenger workers, but it would quickly
be exhausted if registrations are taking that long.

Can you try the following?

  • edit /var/lib/pgsql/data/postgresql.conf and edit:

#log_min_duration_statement = -1

to say:

log_min_duration_statement = 500

This will log every SQL query that is taking longer than 1/2 second.

  • reload postgresql (no need to restart, just “service postgresql
    reload”)

  • perform a host registration

  • check /var/lib/pgsql/data/pg_log/postgresql-.log

I am guessing there will be at least one slow query in there. If you can
post back with the log from when that ran, we can look into this issue
further.

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 foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

>
>
>> Thank you Chris
>>
>> It seems to be an issue with the SQL query : UPDATE "architectures" SET
>> "hosts_count" = COALESCE("hosts_count", 0) + 1 WHERE "architectures"."id" =
>> 1

>>
>> Waou, it takes 307s.
>
> 307s is a lot:) how many hosts do you have?

You can also enable log_lock_waits in your postgres config and reload
postgres, which may reveal a lock being held.

··· On 04/25/2016 11:27 AM, Chris Duryee wrote: > On 04/22/2016 03:53 AM, Romain P wrote:

I also display the logs of candlepin, but found nothing else.

2016-04-22 09:35:43 [app] [I] Started POST
"/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
172.17.0.126 at 2016-04-22 09:35:43 +0200
2016-04-22 09:35:43 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-04-22 09:35:43 [app] [I] Parameters: {“facts”=>"[FILTERED]",
“contentTags”=>nil, “type”=>“system”, “name”=>“a6f5bddaec84”,
“owner”=>“Default_Organization”, “activation_keys”=>“my-key”}
2016-04-22 09:35:44 [app] [I] Import facts for ‘a6f5bddaec84’ completed.
Added: 76, Updated: 0, Deleted 0 facts
2016-04-22 09:36:58,000 [thread=http-bio-8443-exec-10]
[req=a8b4f0c9-b4ff-4df1-96e3-204ec367bf31, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/activation_keys/8a80828f5418e6a50154190826db0009
2016-04-22 09:36:58,031 [thread=http-bio-8443-exec-10]
[req=a8b4f0c9-b4ff-4df1-96e3-204ec367bf31, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=32
2016-04-22 09:36:58,130 [thread=http-bio-8443-exec-6]
[req=1218d92b-935f-4bc4-b627-aa92f07b2fdc, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/status
2016-04-22 09:36:58,135 [thread=http-bio-8443-exec-6]
[req=1218d92b-935f-4bc4-b627-aa92f07b2fdc, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=4
2016-04-22 09:36:58,169 [thread=http-bio-8443-exec-5]
[req=9d4b4133-e96d-4bbd-aa35-42fea66f2df7, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/status
2016-04-22 09:36:58,171 [thread=http-bio-8443-exec-5]
[req=9d4b4133-e96d-4bbd-aa35-42fea66f2df7, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=2
2016-04-22 09:36:58,253 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=POST,
uri=/candlepin/environments/7-4/consumers/?activation_keys=9b2ef4c8-c8a7-4540-a379-f80a67012fbf
2016-04-22 09:37:00,124 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.policy.js.autobind.AutobindRules - No pools available to
rules for products: []
2016-04-22 09:37:00,124 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.controller.CandlepinPoolManager - No entitlements available
for products: []
2016-04-22 09:37:00,133 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.resource.ConsumerResource - Consumer
a3569c27-09e8-45a4-9285-aefe7029c9a5 created in org Default_Organization
2016-04-22 09:37:00,139 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.audit.HornetqEventDispatcher - Sending event: Event
[id=null, target=CONSUMER, type=CREATED, time=Fri Apr 22 09:36:59 CEST
2016, entity=ff80808154398a2c01543ce67ab600a4]
2016-04-22 09:37:00,148 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.audit.HornetqEventDispatcher - Sending event: Event
[id=null, target=COMPLIANCE, type=CREATED, time=Fri Apr 22 09:37:00 CEST
2016, entity=ff80808154398a2c01543ce67ab600a4]
2016-04-22 09:37:00,156 [thread=http-bio-8443-exec-1]
[req=dbcd27ad-c7c2-44aa-95cd-3eabded76f23, org=] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=1903
LOG: duration: 307950.035 ms execute : UPDATE “architectures"
SET “hosts_count” = COALESCE(“hosts_count”, 0) + 1 WHERE
"architectures”.“id” = 1

2016-04-22 09:37:00,629 [thread=http-bio-8443-exec-4]
[req=6627eb58-c365-448c-add1-18e964f9a39d, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/consumers/a3569c27-09e8-45a4-9285-aefe7029c9a5
2016-04-22 09:37:00,689 [thread=http-bio-8443-exec-4]
[req=6627eb58-c365-448c-add1-18e964f9a39d, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=61
2016-04-22 09:37:00,887 [thread=http-bio-8443-exec-9]
[req=afe64765-f0ac-498c-b729-6b2feaa33a4d, org=] INFO
org.candlepin.common.filter.LoggingFilter - Request: verb=GET,
uri=/candlepin/consumers/a3569c27-09e8-45a4-9285-aefe7029c9a5
2016-04-22 09:37:00,930 [thread=http-bio-8443-exec-9]
[req=afe64765-f0ac-498c-b729-6b2feaa33a4d, org=Default_Organization] INFO
org.candlepin.common.filter.LoggingFilter - Response: status=200,
content-type=“application/json”, time=43
2016-04-22 09:37:00 [app] [I] Completed 200 OK in 386068ms (Views: 1.3ms |
ActiveRecord: 307207.3ms)

2016-04-21 18:32 GMT+02:00 Chris Duryee cduryee@redhat.com:

On 04/21/2016 12:20 PM, Chris Duryee wrote:

On 04/21/2016 12:09 PM, Romain P wrote:

Hello,

I am currently trying to add hosts on my Katello3.0 RC3 instance.

Each host takes several minutes to be added and the Katello web UI is
not

responding during this time.

Is there any parameter I can tune to not block the web UI or make the
registration faster ?

2016-04-21 18:01:02 [app] [I] Started POST
"/rhsm/consumers?owner=Default_Organization&activation_keys=my-key" for
172.17.0.110 at 2016-04-21 18:01:02 +0200
2016-04-21 18:01:02 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-04-21 18:01:02 [app] [I] Parameters: {“facts”=>"[FILTERED]",
“contentTags”=>nil, “type”=>“system”, “name”=>“30404e7d296c”,
“owner”=>“Default_Organization”, “activation_keys”=>“my-key”}
2016-04-21 18:01:03 [app] [I] Import facts for ‘30404e7d296c’ completed.
Added: 76, Updated: 0, Deleted 0 facts
2016-04-21 18:02:20 [app] [I] Completed 200 OK in 244429ms (Views:
1.7ms |

ActiveRecord: 157689.1ms)

Kind regards
Romain

Whoops sorry, I misread the API call originally. The below instructions
may not catch the issue:)

Can you post back with the output of /var/log/candlepin/candlepin.log
from around the time you added the host?

You can increase the number of Passenger workers, but it would quickly
be exhausted if registrations are taking that long.

Can you try the following?

  • edit /var/lib/pgsql/data/postgresql.conf and edit:

#log_min_duration_statement = -1

to say:

log_min_duration_statement = 500

This will log every SQL query that is taking longer than 1/2 second.

  • reload postgresql (no need to restart, just “service postgresql
    reload”)

  • perform a host registration

  • check /var/lib/pgsql/data/pg_log/postgresql-.log

I am guessing there will be at least one slow query in there. If you can
post back with the log from when that ran, we can look into this issue
further.

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 foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.