Closed numeroteca closed 10 years ago
After reproducing the problem, tailing /var/log/apache2/error.log showed this error:
Error opening file for reading: Permission denied
I'm not sure which file was the problem, but after adding read permissions for the entire app, the problem seems to be fixed.
I still have the problem when adding days to a thread. I added 1 day to http://pageonex.com/numeroteca/geziparki/ and it gave me the same 500 Internal Server Error.
Then, once I reload twice, it worked. Here is the log:
Started GET "/numeroteca/geziparki/" for 83.60.24.174 at 2013-07-04 01:10:57 +0000 Processing by CodingController#display as HTML Parameters: {"username"=>"numeroteca", "thread_name"=>"geziparki"}
Started GET "/numeroteca/geziparki/" for 83.60.24.174 at 2013-07-04 01:11:23 +0000 Processing by CodingController#display as HTML Parameters: {"username"=>"numeroteca", "thread_name"=>"geziparki"} Rendered coding/_coding_footer.html.erb (0.9ms) Rendered coding/display.html.erb within layouts/application (1854.2ms) Completed 200 OK in 12721ms (Views: 1733.6ms | ActiveRecord: 1691.1ms)
I pulled down the production db so I could try this locally. It worked fine, but executed a crazy amount of queries. I reduced many of these by adding some more Rails-like code. That might help the memory issue too.
It hasn't crashed so far, in the past days, with very long threads. I guess the change worked. Great!
Not enough memory