(Of course I’ll be doing plenty of validation after submission)
As a start, I’m just hitting submit, and then printing the values of $_FILES in my process script. What I’m finding is that both locally or on my production server, if I do a bunch of these submits in a row (in other words, submit –>look at my $_FILES array–>do this again with another file), that rather quickly, I’ll need to double submit or php gets stuck. Might there be an explanation for this in terms of how php allocates memory? And if so, is there anyway around this?
Sorry if the issue isn’t clear! Basically, I submit a file, take a quick look at my output, then try to upload another file. If I do a bunch of these in a row, I’m finding that php stalls. If you note, this particular file isn’t really big so there should be an issue.
I just ran several tests on Linux Apache setup and never got a single hang up. So I’m leaning towards your Apache or IIS configuration being the culprit. You may want to ensure logging is turned on and watch your logs on each request.
Be sure to restart apache after changing the ntp server. If that doesn’t make it go away, I’ll still be doing more digging, but if you could give us more of the apache log (like a section of it that also contains the penaltytimeforserver error, that may help.
Cool! I’ll check out the links. In the meantime, my log looks like:
Nov 21 15:50:02 Macintosh-78 SecurityAgent: de.appsolute.runServers|2012-11-21 15:50:02 -0800
Nov 21 15:50:02 Macintosh-78 com.apple.WindowServer: Wed Nov 21 15:50:02 Macintosh-78.local WindowServer <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Nov 21 15:50:02 Macintosh-78 WindowServer: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Nov 21 15:51:15 Macintosh-78 mDNSResponder: PenaltyTimeForServer: PenaltyTime negative -13238, (server penaltyTime -1260237391, timenow -1260224153) resetting the penalty
Nov 21 15:56:16 Macintosh-78 Safari: Periodic CFURLCache Insert stats (iters: 361) - Tx time:0.189981, # of Inserts: 23, # of bytes written: 7525, Did shrink: NO, Size of cache-file: 144932864, Num of Failures: 0
Nov 21 15:56:16 Macintosh-78 WebProcess: Periodic CFURLCache Insert stats (iters: 360) - Tx time:0.011868, # of Inserts: 1, # of bytes written: 216652, Did shrink: NO, Size of cache-file: 145154048, Num of Failures: 0
Nov 21 16:13:29 Macintosh-78 mdworker32: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Nov 21 16:17:02 Macintosh-78 Safari: IPCClient: Server port 0 is invalid; looking it up again…
However…if nothing jumps out at you, I think that I may just ignore this error as long as it works on my production server.
Any final pre-Thanksgiving thoughts based on the above?
I did the restart and got a different message this time around:
Nov 21 16:39:28 Macintosh-78 Safari Webpage Preview Fetcher: INSERT-HANG-DETECTED: Tx time:4.856969, # of Inserts: 1, # of bytes written: 2907, Did shrink: NO
Nov 21 16:39:39 Macintosh-78 Safari Webpage Preview Fetcher: INSERT-HANG-DETECTED: Tx time:5.920149, # of Inserts: 5, # of bytes written: 237676, Did shrink: NO
Nov 21 16:43:25 Macintosh-78 Safari: IPCClient: Server port 0 is invalid; looking it up again…
At least it seems a little bit more descriptive (Insert-hang-detected???). Regardless, I fear that based on what you’ve said, this may be a Mac/local Apache issue and it’s beginning to feel a little bit like a Black Hole of Doom. So…I’m going to play around with file uploads to my real-deal server, and unless things are still funky (I can’t image why they would be!), I’ll consider this matter closed.
Regardless, I appreciate your time and enjoy your Thanksgiving!
Yep, that seems to definitely point to the Mac/Apache setup, primarily pointing at Safari (have you tried a different browser after quitting safari? - Preferably one that doesn’t use webkit). Another idea is to disable any and all plugins you may have in Safari and if that resolves it, turn them on one at a time to see which one is interfering.
I suspect if your run your script on a different setup you will see it will run without issue.
Hope you have a good Thanksgiving as well. Right now we will likely be staying home as our daughter (2 years old) and my wife both have a stomach bug and we’d hate to pass that around, but if they are feeling any better by tomorrow afternoon we may make our way to see family on Friday.