If you get a 404 error after 60 seconds running an add-on and you're using Nginx, you need to set the fastcgi_read_timeout directive.
/etc/nginx/nginx.conf
After making the change you need to reload the service:
/etc/nginx/nginx.conf
Code:
http {
#...
fastcgi_read_timeout 300;
#...
}
After making the change you need to reload the service:
Code:
service php5-fpm reload
service nginx reload