[
https://issues.apache.org/jira/browse/COUCHDB-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14248178#comment-14248178
]
Alexander Shorin commented on COUCHDB-536:
------------------------------------------
2048 is to small too. Even single while curl process produces 10K active
connections. Though, you better configure this according your setup. On second,
in your program you can tell your http client how long should it wait for a
response and curl also has option for that. On your system you may also
configure how long it will serve TIME_WAIT connections before close them.
Server actually monitors inactive connections and drops dead ones - iirc
mochiweb has 30 seconds timeout for that, but if they're running with keepalive
on, certainly, they will say active for a much longer time.
> CouchDB HTTP server stops accepting connections
> -----------------------------------------------
>
> Key: COUCHDB-536
> URL: https://issues.apache.org/jira/browse/COUCHDB-536
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Affects Versions: 0.10, 1.1
> Environment: Ubuntu Linux 8.04 32bit and 64bit with Erlang R13B01
> or Ubuntu Linux 8.04 64bit with Erlang R14B02
> Reporter: Simon Eisenmann
> Attachments: couchdb_database_open-week.png,
> couchdb_httpd_request_methods-week.png, couchdb_httpd_response_codes-week.png
>
>
> Having 3 Couches all replicating a couple of databases to each other (pull
> replication with a update notification process) the HTTP service on any of
> the Couches stops working at some point (when running for a couple of ours
> with constant changes on all databases and servers).
> This is the error when a new HTTP request comes in:
> =ERROR REPORT==== 19-Oct-2009::10:18:55 ===
> application: mochiweb
> "Accept failed error"
> "{error,enfile}"
> [error] [<0.21619.12>] {error_report,<0.24.0>,
> {<0.21619.12>,crash_report,
> [[{initial_call,{mochiweb_socket_server,acceptor_loop,['Argument__1']}},
> {pid,<0.21619.12>},
> {registered_name,[]},
> {error_info,
> {exit,
> {error,accept_failed},
> [{mochiweb_socket_server,acceptor_loop,1},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_httpd,couch_secondary_services,couch_server_sup,<0.1.0>]},
> {messages,[]},
> {links,[<0.66.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,running},
> {heap_size,233},
> {stack_size,24},
> {reductions,202}],
> []]}}
> [error] [<0.66.0>] {error_report,<0.24.0>,
> {<0.66.0>,std_error,
> {mochiweb_socket_server,225,{acceptor_error,{error,accept_failed}}}}}
> To me this seems like it runs out of threads or sockets to handle the new
> connection or somewhat like this.
> Also i see in this setup that if i put lots of changes in a short time at
> some point the replication process hangs (never finishes) and when trying to
> restart the same replication once again is not possible and resulting in a
> timeout.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)