I have a php page that needs to be written to the database sometimes at the beginning of the script.
The page is unavailable during a scheduled mysqldump backup because it is trying to write to a locked table.
During the lock, MySql queues these sql updates, and after the backup is completed, they are performed as desired. However, my php page will not be displayed until the backup is complete.
However, since updates do not return anything to the script, I would like them to not hang my script during blocking; I hope I can tell php to just send the sql update to mysql and not worry about confirming that the update is complete.
I want php to send the request to mysql and then just go to the next line of php if the update does not complete in one second.
I am running php on a Windows server, so I understand that some type of streaming is not an option.
If there is a way to set a timeout on this request (in particular), this may be ideal, but I do not want to refuse to upgrade sql at all if it expires. I still want MySQL to process it after the lock has disappeared.
What would you recommend (given that removing sql updates is not an option at all)?
source
share