I have a strange problem with sinatra…
In my app the login form is checking with AJAX live whether a nickname is already taken or free… This works fine 90% of the time… But sometimes, randomly, I get no response from the given route anymore… in the console log all new requests to this route are missing as if I haven’t sent anything… but other routes seem to be fine…
And when that occurs, if I shutdown sinatra, it begins to obviously hang. it says:
[2010-08-29 22:41:12] INFO going to shutdown ...
but the process does not terminate anymore until I close the console window.
I checked my client side code – it works fine… I also checked the code in the route itself… (only about 7 lines) – its fine too (the only method, the one which accesses the database, works flawlessly in all other circumstances)
So the only explaination I came up with that it must be a Sinatra bug…
Has someone experienced something similar? If not… do you agree? Should I file a bug report? And what shall I write into that report? The bug is much too… random…
UPDATE:
enable :lock unfortunately doesn'nt help...
I tried to use hijack... it doesn't seem to work on the process
(I used the pid given by WEBrick)
Well, must have been activerecords fault, after all…
I switched to DataMapper and the bug was gone..