By mascotsoft
Hello everyone,
Is there any settings I can use to tell nginx to write same error only once in log file.
I have a high traffic site and when there is an error. because the same error is written for each request. the log file size gets too large too quickly.
Thanks for your advise.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I am not aware of any way to do this. While it would be possible to disable error logs completely I don’t know of any native way to filter them like this. I can also see this causing potential issues. If you were able to set this up, while you would no longer be flooded with error messages, how would you know an error that occurred previously was fixed if your web server stopped reporting it after it occurred once? How would you know if an issue in your logs was a one-off instance or endemic and affecting all your users? There are solutions for log analysis (feeding your logs into another system to process them) or rotation (to prevent ending up with massive log files to dig through) that might be a better fit.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.