I am using CentOS and Tor v0.2.7.6 (compiled from source). Nginx is used as a HTTPS proxy and listens to 127.0.0.1:443. I have configured one hidden service. It redirects incoming data to nginx. Service must be reliable, but it becomes unavailable when it receives > 500 requests per minute. Tor is using 99.9% CPU, and tor log contains this:
Feb 25 14:01:45.000 [warn] Your Guard PartitoPirata ($6EF7A07C6C69F24ED3F501698CF4EB3DA2536BFF) is failing a very large amount of circuits. Most likely this means the Tor network is overloaded, but it could also mean an attack against you or potentially the guard itself. Success counts are 94/215. Use counts are 11/13. 96 circuits completed, 2 were unusable, 0 collapsed, and 802 timed out. For reference, your timeout cutoff is 60 seconds.
Feb 25 15:03:42.000 [warn] Your Guard fltrpb ($4B1A65328E06B3BD8C3841497212563827442534) is failing a very large amount of circuits. Most likely this means the Tor network is overloaded, but it could also mean an attack against you or potentially the guard itself. Success counts are 94/288. Use counts are 5/9. 98 circuits completed, 4 were unusable, 0 collapsed, and 5685 timed out. For reference, your timeout cutoff is 60 seconds.
Is my service under DDoS and how to check and prevent it? How can I configure Tor to work with heavy loads?