2

I have a system where some queries are executed on the webapp server and others on the worker machines, that consume jobs from a queue.

Some clients make atipical requests for the database that exceed the 60 seconds for the HTTP transaction, receiving a Timeout error on the frontend.

On the other hand, the database keeps running those long queries. The users usually end up hitting the refresh button which leads to a overload on the database.

Is there a way to close those queries that were executed by the web server once the request has timed out? I understand I could place some limits on the MySQL server, but I do want the worker to be able to make long requests.

  • 1
    [this](https://stackoverflow.com/questions/46923385/php-pdo-execute-to-abort-when-mysql-query-taking-more-than-x-seconds/46923422) might help – apokryfos Apr 09 '21 at 00:17

0 Answers0