gregoriusxu / booksleeve

Automatically exported from code.google.com/p/booksleeve
Other
0 stars 0 forks source link

System.TimeoutException #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I know this not much of a bug report, but maybe someone can shed some light on 
a problem i'm having.

We have a fairly simple job queueing system build on redis + booksleeve.
It basically loops over the following method and if it doesn't return null, it 
means we have a job and we go run it.

        public static Job Pop(string queue)
        {
            var client = redis();

            var task = client.Lists.RemoveFirstString(Jobs.DB, GetKey("queue:" + queue)).ContinueWith(x =>
            {
                if (x.Result != null)
                {
                    var job = LoadJob(x.Result);
                    job.Queue = queue;

                    return job;
                }
                return null;
            });

            task.ContinueWith(x =>
            {
                if (x.Result != null)
                    client.Keys.Remove(Jobs.DB, GetKey("queue:job:" + x.Result.Identitifer));
            });

            return client.Wait(task);
        }

Now we get a System.TimeoutException on the last line. Strange thing is, this 
only happens in our production environment and not our development and test 
environments.

We're running Redis 2.9.7 in all of our environments.

The timeoutexception gets thrown maybe once every 5 or so calls.
Anyone have an idea what could be wrong here?

Original issue reported on code.google.com by johanalk...@gmail.com on 8 Nov 2012 at 3:53

GoogleCodeExporter commented 8 years ago
Just to clarify, i'm not able to reproduce this bug, but it does happen in 
production.

Original comment by johanalk...@gmail.com on 8 Nov 2012 at 3:54