We simply went into an issue with our cloud host - they have transformed their apache configurations to pressure a significantly shorter page timeout, and today throughout certain processes (report creation, etc.) that take a lot more than just a few seconds (that the client is okay with we are processing immeasureable data) we obtain a mistake:

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /administrator/index.php.

Reason: Error reading from remote server

I've confirmed our code continues to be running properly without anyone's knowledge, and double-checked using the host that this is actually only a timeout. Their suggestion was to produce a progress bar that's connected using the after sales code this way apache knows something continues to be happening and will not break.

I have done progress bars connected the page load occasions (i.e. when all images are loaded, etc.) but have no clue how to pull off developing a progress bar connected with after sales code. This can be a Joomla site, created in mvc php, and also the code that's leading to the problem is area of the model - the different pieces that may be involved are doing humongous queries. The tables are indexed properly and also the queries are enhanced the problem isn't steps to make the processes take a shorter period - because we are on the cloud server the timeout limit might be transformed to five seconds tomorrow with no type of warning. Things I require is anyone to point me within the right direction of methods to produce the progress bar therefore it is really connected using the function being run within the model.

Any ideas? I am a complete beginner so far as it goes.

Regardless of the background process does should update something similar to personal files or database entry having a percentage completed every X seconds or at set places in the flow. You'll be able to call another script from Javascript every X seconds also it returns the share completed through the database record.






The simplest way I'm able to think about is by using a 2-step process:

  1. Possess the model create occasions to some textfile or something like that if this reaches a vital point.
  2. Apply certain ajax method to achieve the page regularly make sure that apply for updates, increase the progress bar as a result.