lighttpd1.4.19奇怪報錯?
偶爾會在err——log里出現
2008-12-16 17:55:02: (network_linux_sendfile.c.143) open failed: No such file or directory
2008-12-16 17:55:02: (connections.c.685) connection closed: write failed on fd 620
前台偶爾會出現500錯誤。
最初以為是openfile的問題。調整到了也沒用。
Lig配置文件中server.max-fds = 16384參數也不小啊
真的不知道怎麼回事了另外我的lig打了mod_cache補丁。
有哪位朋友指點一下么
network_linux_sendfile.c.143 處
140 /* open file if not already opened */
141 if (-1 == c->file.fd) {
142 if (-1 == (c->file.fd = open(c->file.name->ptr, O_RDONLY))) {
143 log_error_write(srv, __FILE__, __LINE__, "ss", "open failed: ", strerror(errno));
144
145 return -1;
146 }
connections.c.685 處
673 /* write chunks from output_queue to network */
674 switch(network_write_chunkqueue(srv, con, con->output_queue)) {
675 case 0:
676 if (finished) {
677 connection_set_state(srv, con, CON_STATE_RESPONSE_END);
678 joblist_append(srv, con);
679 } else {
680 /* not finished yet -> WRITE */
681 con->is_writable = 1;
682 }
683 break;
684 case -1: /* error on our side */
685 log_error_write(srv, __FILE__, __LINE__, "sd",
686 "connection closed: write failed on fd", con->fd);
687 connection_set_state(srv, con, CON_STATE_ERROR);
688 joblist_append(srv, con);
689 break;
690 case -2: /* remote close */
691 connection_set_state(srv, con, CON_STATE_ERROR);
692 joblist_append(srv, con);
693 break;
694 case 1:
695 con->is_writable = 0;
696
697 /* not finished yet -> WRITE */
698 break;
699 }
700
701 return 0;
702 }
《解決方案》
http://redmine.lighttpd.net/issues/show/784