updating database very long
-
Hello,
Our fog server is working very well for several years.
Its configuration has not changed for 1 year.
But for 2 mounth, when deploying image, the sequence “updating database” is very long, about 2 minutes.
Everythings else seems to be working nice.Arnaud
-
@lebrun78 Does it fail or succeed on “updating database”?
-
The task is finished, so I suppose the database update is successful.
-
@lebrun78 I suppose it’s got to do with your database having a lot of entries collected over the years. But it’s just a wild guess. Are you familiar with slow request logging in mysql? That’s probably a good starting point to figure out why the update takes long.
-
Precisely, it is following a purge of the deployment reports that the problem appeared.
How could I evaluate access time off a base log request ? -
@lebrun78 Sorry for my late reply, have been away for a bit. I am not exactly sure I get what you are saying here.
See here on how to enable slow query logging and see if you can find out if it’s the database itself taking so long at “Updating databse” stage: https://www.a2hosting.com/kb/developer-corner/mysql/enabling-the-slow-query-log-in-mysql
-
@Sebastian-Roth
Thank you,
I tried the procedure you proposed but , with a log for request over 2 seconds, I don’t obtain anything in my /var/lib/mysql/fogus-slow.log . -
@lebrun78 said in updating database very long:
with a log for request over 2 seconds,
Do you really mean two seconds? You probably need to look into this for longer.
What did you set
long_query_time
to? see here -
I have reboot the server yesterday,
Now updating database is very fast.
And I receive mails for task results…I think the problem appeared when I set “FOG_EMAIL_ACTION”.
Thanks for your answers