ajax and 504 gateway error

Read 4718 times
Hello, we are getting "ajax request failed" when try loading stats from an account with many visitors, after the error try to go to "home" and get "504 gateway error"

control panel > stats > reports > listeners

on "cc-web.log" we see:

====================
2013/06/03 20:11:20 [error] 3610#0: *64 upstream timed out (110: Connection timed out) while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: centovacast, request: "POST /client/rpc.php?m=statistics.get_period_activity&r=3&r1=508928&s=statistics&h=0&j=1 HTTP/1.1", upstream: "fastcgi://unix:/usr/local/centovacast/var/run/cc-appserver.sock", host: "XXX.XXX.XXX:2199", referrer: "http://XXX.XXX.XXX:2199/client/index.php?page=statistics"

====================

any idea how solve this?
this error only occur on accounts with many visitors (more than 2000 by day)
Did you solve this problem?