[peruser] problems in process_socket

Lazy lazy404 at gmail.com
Sun Jun 12 06:28:00 MDT 2011


Hello,

[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): returned from process_socket()
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): Child 1210 (WORKER) is now ready
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): input available ... resetting socket.
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) receive_from_multiplexer(): receiving from sock_fd=1586
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) receive_from_multiplexer(): recvmsg returned 520
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) receive_from_multiplexer(): trans_sock=33824632 fdx=3
sock_fd=3
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) receive_from_multiplexer(): header_len=311 headers="GET /"
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) receive_from_multiplexer(): header_len > 0, we got a
request
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) receive_from_multiplexer(): There is no body
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) receive_from_multiplexer(): returning 0
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): Child 1210 (WORKER) is now active
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): CHECKING IF WE SHOULD CLONE A CHILD...
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): total_processors = 5, max_processors = 40
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): idle_processors = 0, min_free_processors = 1
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): CLONING CHILD
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_clone(): cloning child #933 from #1210
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): marked jmpbuffer
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) child_main(): calling process_socket()
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) process_socket(): Creating dummy connection to use the
vhost lookup api
[Sun Jun 12 12:26:19 2011] [info] (107)Transport endpoint is not
connected: apr_socket_addr_get(APR_REMOTE)
^^^^^ error in process_socket()

    ap_create_sb_handle(&sbh, p, conn_id, 0);
    current_conn = ap_run_create_connection(p, ap_server_conf, sock,
conn_id,
                                            sbh, bucket_alloc);
    _DBG("Looking up the right vhost");
    if (current_conn) {


later we try to get the socket, whitch ofcrs fails if remote end
closed connection
    if ((rv = apr_os_sock_get(&sock_fd, sock)) != APR_SUCCESS)
    {
        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
"apr_os_sock_get");
    }

eaven when ap_create_connection fails

[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) process_socket(): Looking up the right vhost
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) process_socket(): child_num=1210 sock=33824632 sock_fd=-1
[Sun Jun 12 12:26:19 2011] [warn] (peruser: pid=31098 uid=1305
child=1210) process_socket(): type=WORKER 1210
[Sun Jun 12 12:26:19 2011] [warn] nagle2 fail child_num=1210
child_chroot=#1305_#1305_/home pid 31098

when servers dies there usually are a lot of thiese errors
"process_socket(): child_num=1210 sock=33824632 sock_fd=-1", it seems
that distinct server environments fail idependantly,
one site was unavaiable 2 minutes before whole server was unavaiable


how to handle thiese error conditions ?
can we just return in case of a failed ap_create_connection ?

-- 
Lazy


More information about the Peruser mailing list