Created
September 30, 2010 23:30
-
-
Save davesag/605497 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary | |
------- | |
Heroku crashes consistently with an "Ouchie Guy" whenever a logged-in user of my app creates or edits any data. | |
Details | |
------- | |
See the app http://frank-demo.heroku.com | |
I can log into my app as a root user (with 'root' and 'password' to keep it simple) but from that point on any attempt to | |
* edit my profile | |
* create a new user | |
* edit an existing user | |
* delete a user | |
* create a role | |
* edit a role | |
* delete a role | |
all fail with an "ouchie guy" screen. | |
SOMETIMES (and I have only seen this happen once so far) even just displaying the list screens for roles or users will crash with an "ouchie guy" | |
First note: This all works perfectly on my local machine. | |
Second note: I am using Bundler to manage dependencies and so, as far as I can tell, both systems are using the same gems. | |
Detailed Behaviour: | |
------------------- | |
As a logged out guest of the site one can navigate around, register as a new user, use the password reminder functions etc and that all works perfectly. You can switch between languages etc all fine. | |
Log in as root. 'root' and 'password' | |
As a logged in user you can navigate about fine and all works as expected. Switching languages also works fine. | |
Now click on 'List Roles' (or navigate to http://frank-demo.heroku.com/roles as a logged in root user) | |
You will see some roles | |
Click "Add Role" (or just go straight to http://frank-demo.heroku.com/role as a logged in root user) | |
You will get a simple name change form. | |
Set the role name to something unique and click "Create Role" | |
!ouchie guy¡ | |
Logfile analysis step by step. | |
------------------------------ | |
Check the logs: I have added debugs through the code at each step. Here's what happens. (DEBUG lines come from the logs. The rest is my annotation for your benefit.) | |
'List Roles' - get http://frank-demo.heroku.com/roles | |
DEBUG -- : There are 5 Roles | |
DEBUG -- : haml: Aboout to render an haml template called in/list_roles | |
DEBUG -- : haml: Use the logged in layout. | |
DEBUG -- : haml: That's as deep as we can look for a localised file. Using in/list_roles | |
((( RESULT - : page is being rendered))) | |
((( NOTE - : the change_locale_menu_form is a small haml chunk that is called by in/layout.haml ))) | |
DEBUG -- : haml: Aboout to render an haml template called chunks/change_locale_menu_form | |
DEBUG -- : haml: It's a chunk so don't attempt to localise and don't use a layout. | |
DEBUG -- : haml: Nothing to localise so proceed as normal. | |
((( RESULT - : complete page 'in/list_roles' is rendered to the browser and all is good ))) | |
'New Role' - get http://frank-demo.heroku.com/role | |
DEBUG -- : haml: Aboout to render an haml template called in/new_role | |
DEBUG -- : haml: Use the logged in layout. | |
DEBUG -- : haml: That's as deep as we can look for a localised file. Using in/new_role | |
((( RESULT - : page is being rendered))) | |
((( NOTE - : the change_locale_menu_form is a small haml chunk that is called by in/layout.haml ))) | |
DEBUG -- : haml: Aboout to render an haml template called chunks/change_locale_menu_form | |
DEBUG -- : haml: It's a chunk so don't attempt to localise and don't use a layout. | |
DEBUG -- : haml: Nothing to localise so proceed as normal. | |
((( RESULT - : complete page 'in/new_role' is rendered to the browser and all is good ))) | |
'New Role' - post http://frank-demo.heroku.com/role with param[:name] = 'foobah' | |
DEBUG -- : Created new role with name foobah | |
((( RESULT - : The new role is written to the database ok ))) | |
DEBUG -- : There are now 6 Roles | |
((( NOTE - : once the role is created we return to the list_roles view. ))) | |
DEBUG -- : haml: Aboout to render an haml template called in/list_roles | |
DEBUG -- : haml: Use the logged in layout. | |
DEBUG -- : haml: That's as deep as we can look for a localised file. Using in/list_roles | |
((( RESULT - : page is being rendered))) | |
((( NOTE - : the change_locale_menu_form is a small haml chunk that is called by in/layout.haml ))) | |
DEBUG -- : haml: Aboout to render an haml template called chunks/change_locale_menu_form | |
DEBUG -- : haml: It's a chunk so don't attempt to localise and don't use a layout. | |
DEBUG -- : haml: Nothing to localise so proceed as normal. | |
!ouchie guy¡ | |
Conclusions | |
----------- | |
I am evaluating Heroku right now and, for the most part, have been impressed. But this bug is a show-stopper. | |
Although the Heroku docs claim that an "ouchie guy" screen is a problem at your end, not mine, that's little consolation. I need this basic functionality to work, or Heroku is useless to me and I will have to find a more old-school, and tiresome way to host my webapps. | |
* The "ouchie guy" comes up very consistently after ANY writes to the database by a logged in user. | |
* Logged out users that write changes to the database (ie registering as a new user, validating your new user details, requesting a password reset, changing your password) have no problems at all. | |
The only difference between a logged in user and a logged out user is that the logged in user's details are kept in the session. | |
I am truly stumped here. My gut tells me this is something database related, as that's the only difference between what I have here on my local machine and what is running on heroku, and the faults only happen after a database write by a logged in user. | |
But because database writes by NON logged in users work, it's probably NOT a db thing. | |
You guys obviously have way more experience than me with this so please, feel free to have a dig into my code and see if anything strikes you as causing this error. | |
Cheers | |
Dave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment