Skip to content
Fragmented Development

Bizarre Error, Revisited

In a previous post, I mentioned that I was receiving a bizarre error message: "Unable to create temporary work files". It turns out that it may not have been as bizarre as I had once thought.

After making the previously discussed change, things went downhill fast. Errors started coming in, dozens a day, from the same page. We had a brand new problem; every once and a while, queries on the same FoxPro data source would start failing. This was mostly during periods of high volume, and would also randomly start working again after a couple minutes.

My solution was to migrate all the data to a normal SQL database, and that worked – but while I was working on that, I was able to track down the problem.

It appears that the Microsoft Visual FoxPro ODBC driver was indeed having trouble creating temporary files. I found that, upon every new connection, the server created a randomly named temporary file in one of Windows' temp folders. It would then create another for the next connection, and another, and so on. It would keep on creating a temp file for each new connection requested by that process; in this case, the IIS worker process. File #14, no problem. 15 & 16 were cake. But upon creating the 17th file, it crashed and burned. This would make the database unreachable by each subsequent PHP page that loaded and tried to connect until the IIS worker process was recycled, or those files were deleted.

As I said, we solved it by moving all the data to SQL, but I thought I should post this just in case anyone else runs into this problem.

Tags: php server content sql troubleshooting


Add Your Comment