I've spent the past day working on getting pound up and running and discovered a very cool new feature in 2.4 of setting TTL -1 to get a constant hash.
However, trying to use it was consistently hanging pound on the first request. In using HEADER based sessions, anything without the header would go through fine, but the minute a request with the header went through, pound would hang for good (not respond to any other subsequent requests).
*** Pound-2.4/svc.c Tue Apr 1 00:48:00 2008
--- orig/Pound-2.4/svc.c Mon Feb 11 05:53:52 2008
*************** get_backend(SERVICE *const svc, const st
*** 506,512 ****
/* this works for SESS_BASIC, SESS_HEADER and SESS_COOKIE */
if(get_HEADERS(key, svc, headers)) {
if(svc->sess_ttl < 0)
! res = hash_backend(svc->backends, svc->abs_pri, key);
else if((vp = t_find(svc->sessions, key)) == NULL) {
/* no session yet - create one */
res = rand_backend(svc->backends, random() % svc->tot_pri);
--- 506,512 ----
/* this works for SESS_BASIC, SESS_HEADER and SESS_COOKIE */
if(get_HEADERS(key, svc, headers)) {
if(svc->sess_ttl < 0)
! return hash_backend(svc->backends, svc->abs_pri, key);
else if((vp = t_find(svc->sessions, key)) == NULL) {
/* no session yet - create one */
res = rand_backend(svc->backends, random() % svc->tot_pri);
Has seemed to fix the problem. I assume (obviously) it has something to do with the the previously skipped code by doing a direct return;
if(ret_val = pthread_mutex_unlock(&svc->mut))
logmsg(LOG_WARNING, "get_backend() unlock: %s", strerror(ret_val));
I was hoping to get some insight however if this change was really the correct fix.
Thanks