-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle huge trace files #16
Comments
One possible solution to this is to implement some cycling logic using generations and sets of trace files.
The current logic for file naming is:
The new file mask would be of the form: path/filename.set.generation
The generation logic will depend on the value given for limit.
The cycling logic is intended to ensure that concurrent requests do not use the same trace file.
Concurrently executed transactions may still choose the same file.
|
This change should also take in account and/or help address. |
The trace admin page should be updated to reflect the generation logic
|
…ST separately. Also, implement generation logic based on the value of limit.
Using the generation limit of 0 for REST calls allows concurrent tracing of the REST requests issued by the new block editor ( Gutenberg ). But it's not necessary for the standard browser, AJAX or batch ( CLI ) requests. So, I'm going to make 4 versions of the "limit" setting; one per request type. The Trace options page will be updated. screenshot-1.jpg reflects the latest version. Note: I haven't updated the PHPUnit tests yet. |
I noticed that trace reset is not working when the generation limit is not set. |
There is still the possibility that the trace output files could use up a lot of disk space. The oik trace admin section for files shows the total space used for the files. And there’s logic to purge the files. This is documented, so I believe it’s safe to close the issue. |
Whilst it's not advisable to trace in a production system, it's possible to forget to disable tracing.
If a trace file is not being reset for each request, ie. if the trace file is being appended to, then the file can get very large indeed.
Something needs to be done about this since it can lead to the server returning HTTP error code 500.
Note: There could be a problem with the trace file being written to even when tracing is only configured for a specific IP address. I'm looking into it.
The text was updated successfully, but these errors were encountered: