|
what seems to be happening is some sort of loop between mongrel and lightspeed. using strace i can repetitions of one file, for example
writev(4, [{"GET /flower_delivery/florists_in"..., 441}, {"X-Forwarded-For: 74.124.192.171\r"..., 35}], 2) = 476
in lightspeed
and a similar line saying read in mongrel:
read(218, "GET /flower_delivery/florists_in"..., 16384) = 476
the repetition goes on much longer than it would take to transfer the file (minutes), and if i gracefully restart lightspeed (or mongrel) everything returns to normal. there's nothing wrong in the ruby app (ie clicking on the same link to test won't cause a problem, and it happens links in various parts of the site, all of which use caches_page).
is the bad file descriptor the issue? see below:
full lightspeed loop block:
gettimeofday({1178219476, 926735}, NULL) = 0
select(216, [3 215], [], [], {0, 619176}) = 1 (in [3], left {0, 619176})
accept(3, {sa_family=AF_INET, sin_port=htons(36453), sin_addr=inet_addr("127.0.0.1")}, [16]) = 218
fcntl64(218, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(218, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f3c000
_llseek(218, 0, 0xbfe86bbc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fcntl64(218, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(218, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f3b000
_llseek(218, 0, 0xbfe86bbc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
setsockopt(218, SOL_TCP, TCP_CORK, [1], 4) = 0
gettimeofday({1178219476, 930155}, NULL) = 0
select(219, [215 218], [], [], {0, 0}) = 1 (in [218], left {0, 0})
gettimeofday({1178219476, 930767}, NULL) = 0
gettimeofday({1178219476, 931024}, NULL) = 0
select(216, [3 215], [], [], {0, 0}) = 0 (Timeout)
read(218, "GET /flower_delivery/florists_in"..., 16384) = 476
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(218) = 0
munmap(0xb7f3b000, 4096) = 0
close(218) = -1 EBADF (Bad file descriptor)
munmap(0xb7f3c000, 4096) = 0
full mongrel block:
connect(4, {sa_family=AF_INET, sin_port=htons(8000), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP, {u32=4, u64=4}}) = 0
time(NULL) = 1178219495
gettimeofday({1178219495, 538716}, NULL) = 0
epoll_wait(6, {{EPOLLOUT, {u32=4, u64=4}}}, 341, 100) = 1
getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
writev(4, [{"GET /flower_delivery/florists_in"..., 441}, {"X-Forwarded-For: 74.124.192.171\r"..., 35}], 2) = 476
epoll_ctl(6, EPOLL_CTL_MOD, 4, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=4, u64=4}}) = 0
time(NULL) = 1178219495
gettimeofday({1178219495, 540226}, NULL) = 0
epoll_wait(6, {{EPOLLIN, {u32=4, u64=4}}}, 341, 100) = 1
read(4, "", 1460) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 4, {0, {u32=4, u64=4}}) = 0
close(4) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
Last edited by babelian; 05-03-2007 at 12:11 PM..
|