Is there a way to log/record apache connections which are prematurely cut off by the client (either deliberately, or due to a connection error)?
Short story is this: I'm working on educational/training software, and users from one specific location are experiencing a number of errors where it appears that on some requests, they are only receiving part of the response.
This manifests in broken HTML, syntax errors in JavaScript files, and half-complete JSON responses.
Seeing as no other users report these errors, I'm convinced that there's a connection problem from that location, but I need to be able to show that connections were cut off prematurely by the client in order to do that.
So is there any way to record/log when the client prematurely ended the connection?
Best Answer
LogFormat's %X should write
X
to the log file when the connection has been aborted after processing was done. I haven't tested it but from the documentation (mod_log_config), this seems like what you're looking for. Keep in mind that this doesn't necessarily mean there's an issue on their side.I can think of two other ways of troubleshooting this that would give you even more information: