Martin Guetlein
unread,May 5, 2011, 3:06:30 AM5/5/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ohm Ruby
Hi all,
thanks for this useful tool. I am using ohm and redis as database
backend for a sinatra web service application. Things are working fine
as long as I do not try to make several requests at a time.
Simultaneous high-load tests cause the following problems:
* sometimes ohm models are nil (i.e. loaded via find, they do exist)
* sometimes the model itself is loaded, but attributes are nil
* once I got: Resource temporarily unavailable - Timeout reading from
the socket
I am using Ohm.connect :thread_safe => true. I read in the
documentation that "it is recommended to use a different instance per
thread".
Does anyone has an example for that?
I think that I am already doing that, a bit more on my setup: I have
an nginx web-server running, with the puhsion-passenger plugin, with
passenger_spawn_method set to conservative. Accordingly each request
to my service, is handled in an seperate Ruby application process ->
each process has its own Ohm instance.
Help would be very much appreciated, I dont really know how to
proceed,
Best regards,
Martin