From: Eliezer Croitoru Date: 2012-07-13T01:30:52+09:00 Subject: Re: the best way to match these domains. On 7/12/2012 9:34 AM, Jes�s Gabriel y Gal�n wrote: > On Wed, Jul 11, 2012 at 6:18 PM, Eliezer Croitoru wrote: > > I have no experience with the redis ruby library (I've only used it in > Java), but I guess the problem is that the library keeps a connection > open, and when you fork, reusing this connection across processes is a > problem. I don't know how this can be solved. If you are using this > one https://github.com/redis/redis-rb, it says to seek for help here: > "You can also ask for help at #redis-rb on Freenode." > > Maybe you could try to open the connection in each process > individually after the fork. > > Jesus. > Well i can do that but since i am using a "module" it has a method for each operation with a basic redis connection. so i need to change the whole way i am using the module to a "by fork" loading and not for the whole software. for now i will just not use forks since i dont really needs it that much. it was more for testing the enhancements i can get from forks\threads. the basic process can serve more then 1000 requests per second so i'm pretty happy with it. i also added a "cache" db for my filtering engine using redis and it lowered the disk\db access by hundreds percents. Eliezer -- Eliezer Croitoru https://www1.ngtech.co.il IT consulting for Nonprofit organizations eliezer ngtech.co.il