0

I have programmed a simple app that every X minutes checks if an image has changed in several websites and downloads it. It's very simple: downloads image header, make some CRC checks, downloads the file, stores in a MySQL database some data about each image and process next item...

This process takes about 1 minute to complete.

The problem is I have noticed that while the server is executing this process I cannot access to any page in the website, even those that don't require MySQL.

I don't know why it is happening and I have no clue about how to fix it. Perhaps a more advanced PHP programmer can help me.

Ivan
  • 14,692
  • 17
  • 59
  • 96

1 Answers1

0

I think this is because of session files locks
Try to unset sessions cookie and load page, if I right - page is loaded

It would be correct to remove execute this script from web, but if this is necessary, use session_write_close() function to close session and unlock session file

azat
  • 3,545
  • 1
  • 28
  • 30