AppDynamics Knowledge Base

Why does the Controller take longer to start when App Server and MySQL are restarted?

Why does the Controller take longer to start when App Server and MySQL are restarted?

In a large MySQL database with numerous tables and partitions, the information_schema.partitions table is built serially and is cached once built. This is so the App Server can be restarted quickly if the database is not also restarted.

For this reason, it is not recommended to restart the database unless absolutely necessary.

To track how long the Controller takes to start, run the following command from the computer terminal during startup repeatedly at two-minute intervals until the Controller UI is accessible:

echo "select time, info from information_schema.processlist where command = 'Query' and user != 'root';" | <controller_home>/bin/controller.sh login-db 

If the results include the information_schema.partitions, the Controller is building the list of partitions and the Controller UI would not be accessible yet.

If frequent database restarts are necessary, the amount of time to start can be improved by adding the innodb_stats_sample_pages=1 property to the end of the <controller_home>/db/db.cnf file (after "# End of standard db.cnf" ) if it does not exist already and restarting the Controller.

This property is added by default for High Availability Controller Deployments.

Example:

# End of standard db.cnf
# added to speed up startup
innodb_stats_sample_pages=1
Comments
For some reason, the page won't let me select the text of the SQL to check how long Controller start-up takes. The box in which the statement beginning 'echo "select time...' appears to be non-reactive in terms of the apparent horizontal scrollbar too.

Hi Marcus,

I can confirm, using Chrome the box does not scroll horizontally. Looks like we have a bug in our new community redesign. I'll file a ticket with our team, and then change the formatting so that you're able to copy the text. 

Thanks!

Version history
Last update:
‎06-05-2017 09:24 AM
Updated by: