Answer the question
In order to leave comments, you need to log in
Apache how to implement simultaneous operation of several scripts?
Hello. There is a script which processes some data from a DB, and by a condition copies this data to other records in a DB. It is launched through the browser at the site.com/admin/copy_data_from_db link, its execution time is about 24 hours.
But now, when it starts, the server stops responding to other user requests, returns a 504 Gateway Time-out error.
It is necessary to make both this heavy script and other user requests work at the same time, even with some delay in processing speed. Those. make sure that several scripts run in parallel. As far as I know, Apache has the ability to execute multiple scripts at the same time, but why is the server not responding to other requests when this script is run now?
PS Run this script through the console as I understand it will not work, because. it is tied to symfony, and only single scripts can be run through the console.
Answer the question
In order to leave comments, you need to log in
> only single scripts can be run through the console
Read the documentation and don't invent nonsense.
> It is
launched through the browser at the site.com/admin/copy_data_from_db link.
to put nafig your site you need to follow the link ...
> Apache how to implement simultaneous operation of several scripts?
Apache has nothing to do with it with all its might. Read about mysql explain and optimize queries.
If there is nowhere to optimize, break the processing into small parts, for example, 500 lines per iteration. Pay attention to isolation levels.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question