I tried this How can I avoid connection timeout when the same php file runs multiple times but although the extended time limit works (true is returned by the function set_time_limit) I still get the error "Error occurred: SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query"
.
I have a lot of data to grab, and I used to grab the data separately, for separate conditions. For example if the year was changed to 2013, all the data for 2013 was grabbed and that took 30-60 seconds. To avoid that long wait time, I changed it so that at the beginning when the page is loaded, all the data of all years is grabbed in a for loop which would obviously take longer but when interacting with the data there would at least be no wait time. So now it runs xmlhttp.open()
for each year, a total of 5 times (my data is form 2010-2015) and am now getting this error. Is there anything else I can do to extend the timeout?
Thank you