{"comment":{"created_at":"2011-10-14T00:29:56Z","body":"@diversario: Related? Probably not. I'll close the other issue as well, that \"cannot write\" part of net and http has been removed in master.","updated_at":"2011-10-14T00:29:56Z","url":"https://api.github.com/repos/joyent/node/issues/comments/2402067","id":2402067,"user":{"avatar_url":"https://secure.gravatar.com/avatar/3d43d9038ab645ecb2e3a1df2951d30a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3d43d9038ab645ecb2e3a1df2951d30a","url":"https://api.github.com/users/bnoordhuis","id":275871,"login":"bnoordhuis"}},"action":"created","issue":{"number":1176,"created_at":"2011-06-13T18:02:06Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"OS: Ubuntu 10.04.2 LTS \r\nNode version: 0.4.8 (latest from node.js official site).\r\n\r\nI am having a lot of http.request socket hang up problems.\r\n\r\nInside my node.js http server, I will establish http connection to remote site using http.request.  And I run 500 to 1000 concurrent threads for testing.   In the options, I set Connection:keep-alive and agent.maxSockets=1024\r\n\r\nin the http.request, I have a timeout routine for the http.request, and will abort http client request (clientRequest.abort() )  when the request is time out.  \r\n\r\nWhat I observe is, without the clientRequest.abort(), I will get socket hang up 5-10 minutes right after the program run.  With the timeout and abort in place, I don't have any socket hang up message popping up anymore.  That's good.\r\n\r\nHowever, the socket hang up problem arises if I leave the node server running (idle with no request) and then send it a request after few days, then I will get the socket hang up problem. \r\n\r\n\" socket hang up \r\nat Socket.<anonymous> (http.js:1285.45)\r\nat Socket.emit (events.js:64.17)\r\nat Array.0 (net.js:831.12)\r\nat EventEmitter._tickCallback (node.js:126:26)\r\n\r\nAnd more devastating is that, I thought it is the socket problem from http.request (client). but it isn't.  The whole node.js server doesn't work at all!!!     i.e. the node.Server refuses to take any incoming request!!  It happens on not just one server, but three servers (but running the same code).    \r\n\r\n\r\nMy code:\r\nhttp.server (using express and seq)\r\n\r\n\r\n\r\napp.get('/userLogin', function(sReq, sRes){\r\n\t\r\n\tvar myCounter = sReq.query['myCounter'] || '';\r\n\r\n\tconsole.log(\"----------- myCounter Start \" + myCounter);\r\n\tconsole.error(\"----------- myCounter Start \" + myCounter);\r\n\t\r\n\t\r\n\tvar rtnObj = {};\r\n\tvar errObj = false;\r\n\tvar isSent = false;\r\n\t\r\n\tvar input = {\r\n\t\t\temail:sReq.query['email'] || '',\r\n\t\t\tpassword:sReq.query['password'] || ''\t};\r\n\t\r\n\tSeq()\r\n\t.seq(function (data) {\r\n\t\tinput.myCounter = myCounter;\r\n\t\t\r\n\t\tMyClient.userLogin(input, this);\r\n\t})\r\n\t.seq(function (data) {\r\n\t\r\n\t\tif (data.status === false) {\r\n\t\t\tthis(data);\r\n\t\t} else {\r\n\t\t\tthis(null, input);\r\n\t\t}\r\n\t})\r\n\t.catch(function(err) {\r\n    \tconsole.error(\"Catch Error: \" + JSON.stringify(err) + \" myCounter: \" + myCounter);\r\n    \terrObj = err;\r\n    })\r\n\t.seq(function(data){\r\n\t\r\n\t\tconsole.log(\">>>>>>>>> \" + JSON.stringify(data));\r\n\t\t\r\n\t\t\r\n\t\tif (errObj) {\r\n\t\t\tconsole.log(\"error?? \" + JSON.stringify(errObj));\r\n\t\t\trtnObj = errObj;\r\n\t\t\tif (rtnObj.err) {\r\n\t\t\t\trtnObj.message = rtnObj.err;\r\n\t\t\t\tdelete rtnObj.err;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\trtnObj = data;\r\n\t\t}\r\n\t\tconsole.log(\"Final Output: \" + JSON.stringify(rtnObj));\r\n\t\tif (! isSent) {\r\n\t\t\tisSent = true;\r\n\t\t\tsRes.contentType('application/json');\r\n\t\t\tsRes.send(util.genCallback(callback, rtnObj));\r\n\t\t}\r\n\t});\r\n\t\r\n});\r\n\r\n\r\n------------\r\nMyClient.js\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar options = {\r\n\t\thost:123.123.123.123,\r\n\t\tport:80,\r\n\t\theaders:{\r\n\t\t\t\t\"Connection\":'keep-alive'\r\n\t\t\t}\r\n\t};\r\n\r\nvar agent = http.getAgent(123.123.123.123, 80);\r\nagent.maxSockets = 1024;\r\noptions.agent = agent;\r\n\r\nexports.userLogin = function(data, next) {\r\n\ttry {\r\n\t\tvar start = microtime.now();\r\n\t\tvar myCounter = data.myCounter || '';\r\n\t\t\r\n\t\tvar param = {\r\n\t\t\t\temail:data.email,\r\n\t\t\t\tpassword:data.password\r\n\t\t\t};\r\n\t\tvar query = qs.stringify(param, '&', '=');\r\n\t\t\r\n\t\tvar httpOptions = options;\r\n\t\thttpOptions.path = '/remoteLogin?'+query;   // login to remote system\r\n\t\thttpOptions.method = 'POST';\r\n\t\t\r\n\t\t\r\n\t\tvar responseHdr = function(clientResponse) {\r\n\t\t\ttry {\r\n\t\t\t\tvar isSent = false;\r\n\t\t\t\tif (clientResponse){\r\n\t\t\t\t\tclearTimeout(timeoutHdr);\r\n\t\t\t\t\tend = microtime.now();\r\n\t\t\t\t\tvar resultData = '';\r\n\t\t\t\t\tvar numOfTry = 0;\r\n\t\t\t\t\tvar dataParseCallback = function(error, data) {\r\n\t\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\t\tif (error.errType == 'timeout' && numOfTry < 1) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tclientResponse.resume();\r\n\t\t\t\t\t\t\t\tnumOfTry++;\r\n\t\t\t\t\t\t\t} else {\t\t\r\n\t\t\t\t\t\t\t\tnext(error);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnext(null, data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tclientResponse.setEncoding('utf8');\r\n\t\t\t\t\tclientResponse.on('data', function (chunk) {\r\n\t\t\t\t\t\tvar end = microtime.now();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresultData += chunk;\r\n\t\t\t\t\t});\r\n\t\t\r\n\t\t\t\t\tclientResponse.on('end', function(chunk) {\r\n\t\t\t\t\t\tend = microtime.now();\r\n\t\t\t\t\t\tif (chunk) {\r\n\t\t\t\t\t\t\tconsole.error(\"Chunk has Data\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (resultData) {\r\n\t\t\t\t\t\t\tisSent = true;\r\n\t\t\t\t\t\t\tvar myParser = new MYPARSER._class() ;\r\n\t\t\t\t    \t\tconsole.log(\"***Before getting User Login data response\" + \" data: \" + resultData + \" suffix- \" + data.myCounter);\t\t    \t\t\r\n\t\t\t\t    \t\tmyParser.xmltojson(resultData, dataParseCallback);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnext({err:\"userLogin - Client Response Data is undefined. \"});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tclientRequest.abort();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (! isSent) { \r\n\t\t\t\t\t\r\n\t\t\t\t\t\tnext({err:'http client Timeout - userLogin'});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tconsole.error('userLogin - Timeout is sent.' + myCounter);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (ex1) {\r\n\t\t\t\tex1.name = \"remote userLogin Inner Loop\";\r\n\t\t\t\tnext(ex1);\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t\r\n\t\tvar clientRequest = http.request(httpOptions, responseHdr );\r\n\t\t\r\n\t\tvar timeoutHdr = setTimeout(function() {\r\n\t\t\tclientRequest.emit('req-timeout');\r\n\t\t}, 5000);\r\n\r\n\t\t//cfg.http_client_response_timeout\r\n\t\tclientRequest.on(\"req-timeout\", responseHdr);\r\n\t\t\r\n\t\t\r\n\t\tclientRequest.on('error', function(e) {\r\n\t\t\t\r\n\t\t\tclearTimeout(timeoutHdr);\r\n\t\t\tconsole.error('Ok.. clientrequest error' + myCounter);\r\n\t\t\tnext({err:JSON.stringify(e)});\r\n\t\t});\r\n\t\t\r\n\t\tclientRequest.end();\r\n\t} catch (ex) {\r\n\t\tex.name = \"remote userLogin\";\r\n\t\tnext(ex);\r\n\t}\r\n};\r\n\r\n---------------------\r\nSysctl -A output:\r\n\r\nkernel.sched_child_runs_first = 0\r\nkernel.sched_min_granularity_ns = 1000000\r\nkernel.sched_latency_ns = 5000000\r\nkernel.sched_wakeup_granularity_ns = 1000000\r\nkernel.sched_shares_ratelimit = 250000\r\nkernel.sched_shares_thresh = 4\r\nkernel.sched_features = 32611451\r\nkernel.sched_migration_cost = 500000\r\nkernel.sched_nr_migrate = 32\r\nkernel.sched_time_avg = 1000\r\nkernel.timer_migration = 1\r\nkernel.sched_rt_period_us = 1000000\r\nkernel.sched_rt_runtime_us = 950000\r\nkernel.sched_compat_yield = 0\r\nkernel.panic = 0\r\nkernel.core_uses_pid = 0\r\nkernel.core_pattern = core\r\nkernel.core_pipe_limit = 0\r\nkernel.tainted = 0\r\nkernel.latencytop = 0\r\nkernel.real-root-dev = 0\r\nkernel.print-fatal-signals = 0\r\nkernel.ctrl-alt-del = 0\r\nkernel.ftrace_enabled = 1\r\nkernel.ftrace_dump_on_oops = 0\r\nkernel.modprobe = /sbin/modprobe\r\nkernel.modules_disabled = 0\r\nkernel.hotplug =\r\nkernel.sg-big-buff = 32768\r\nkernel.acct = 4 2       30\r\nkernel.sysrq = 1\r\nerror: permission denied on key 'kernel.cad_pid'\r\nkernel.threads-max = 62517\r\nkernel.random.poolsize = 4096\r\nkernel.random.entropy_avail = 162\r\nkernel.random.read_wakeup_threshold = 64\r\nkernel.random.write_wakeup_threshold = 128\r\nkernel.random.boot_id = 596e174e-973c-4a68-9b23-7a34cd9d4256\r\nkernel.random.uuid = 819b7524-0db4-469b-9514-d7a7e1eeb337\r\nkernel.overflowuid = 65534\r\nkernel.overflowgid = 65534\r\nkernel.pid_max = 32768\r\nkernel.panic_on_oops = 0\r\nkernel.printk = 4       4       1       7\r\nkernel.printk_ratelimit = 5\r\nkernel.printk_ratelimit_burst = 10\r\nkernel.printk_delay = 0\r\nkernel.ngroups_max = 65536\r\nkernel.unknown_nmi_panic = 0\r\nkernel.nmi_watchdog = 0\r\nkernel.panic_on_unrecovered_nmi = 0\r\nkernel.panic_on_io_nmi = 0\r\nkernel.bootloader_type = 112\r\nkernel.bootloader_version = 0\r\nkernel.kstack_depth_to_print = 12\r\nkernel.io_delay_type = 1\r\nkernel.randomize_va_space = 2\r\nkernel.acpi_video_flags = 0\r\nkernel.softlockup_panic = 0\r\nkernel.softlockup_thresh = 60\r\nkernel.hung_task_panic = 0\r\nkernel.hung_task_check_count = 4194304\r\nkernel.hung_task_timeout_secs = 120\r\nkernel.hung_task_warnings = 10\r\nkernel.compat-log = 1\r\nkernel.max_lock_depth = 1024\r\nkernel.poweroff_cmd = /sbin/poweroff\r\nkernel.keys.maxkeys = 200\r\nkernel.keys.maxbytes = 20000\r\nkernel.keys.root_maxkeys = 200\r\nkernel.keys.root_maxbytes = 20000\r\nkernel.keys.gc_delay = 300\r\nkernel.slow-work.min-threads = 2\r\nkernel.slow-work.max-threads = 4\r\nkernel.slow-work.vslow-percentage = 50\r\nkernel.perf_event_paranoid = 1\r\nkernel.perf_event_mlock_kb = 512\r\nkernel.perf_event_max_sample_rate = 100000\r\nkernel.blk_iopoll = 1\r\nkernel.vsyscall64 = 1\r\nkernel.ostype = Linux\r\nkernel.osrelease = 2.6.32-30-server\r\nkernel.version = #59-Ubuntu SMP Tue Mar 1 22:46:09 UTC 2011\r\nkernel.hostname = sandbox1\r\nkernel.domainname = (none)\r\nkernel.shmmax = 33554432\r\nkernel.shmall = 2097152\r\nkernel.shmmni = 4096\r\nkernel.msgmax = 8192\r\nkernel.msgmni = 7814\r\nkernel.msgmnb = 16384\r\nkernel.sem = 250        32000   32      128\r\nkernel.auto_msgmni = 1\r\nkernel.pty.max = 4096\r\nkernel.pty.nr = 8\r\nvm.overcommit_memory = 0\r\nvm.panic_on_oom = 0\r\nvm.oom_kill_allocating_task = 0\r\nvm.oom_dump_tasks = 0\r\nvm.overcommit_ratio = 50\r\nvm.page-cluster = 3\r\nvm.dirty_background_ratio = 10\r\nvm.dirty_background_bytes = 0\r\nvm.dirty_ratio = 20\r\nvm.dirty_bytes = 0\r\nvm.dirty_writeback_centisecs = 500\r\nvm.dirty_expire_centisecs = 3000\r\nvm.nr_pdflush_threads = 0\r\nvm.swappiness = 60\r\nvm.nr_hugepages = 0\r\nvm.hugetlb_shm_group = 0\r\nvm.hugepages_treat_as_movable = 0\r\nvm.nr_overcommit_hugepages = 0\r\nvm.lowmem_reserve_ratio = 256   256     32\r\nvm.drop_caches = 0\r\nvm.min_free_kbytes = 8072\r\nvm.percpu_pagelist_fraction = 0\r\nvm.max_map_count = 65530\r\nvm.laptop_mode = 0\r\nvm.block_dump = 0\r\nvm.vfs_cache_pressure = 100\r\nvm.legacy_va_layout = 0\r\nvm.zone_reclaim_mode = 0\r\nvm.min_unmapped_ratio = 1\r\nvm.min_slab_ratio = 5\r\nvm.stat_interval = 1\r\nvm.mmap_min_addr = 65536\r\nvm.numa_zonelist_order = default\r\nvm.scan_unevictable_pages = 0\r\nvm.memory_failure_early_kill = 0\r\nvm.memory_failure_recovery = 1\r\nfs.inode-nr = 27517     65\r\nfs.inode-state = 27517  65      0       0       0       0       0\r\nfs.file-nr = 992        0       390252\r\nfs.file-max = 390252\r\nfs.nr_open = 1048576\r\nfs.dentry-state = 32613 29949   45      0       0       0\r\nfs.overflowuid = 65534\r\nfs.overflowgid = 65534\r\nfs.leases-enable = 1\r\nfs.dir-notify-enable = 1\r\nfs.lease-break-time = 45\r\nfs.aio-nr = 0\r\nfs.aio-max-nr = 65536\r\nfs.inotify.max_user_instances = 128\r\nfs.inotify.max_user_watches = 8192\r\nfs.inotify.max_queued_events = 16384\r\nfs.epoll.max_user_watches = 819425\r\nfs.suid_dumpable = 0\r\nfs.quota.lookups = 0\r\nfs.quota.drops = 0\r\nfs.quota.reads = 0\r\nfs.quota.writes = 0\r\nfs.quota.cache_hits = 0\r\nfs.quota.allocated_dquots = 0\r\nfs.quota.free_dquots = 0\r\nfs.quota.syncs = 0\r\nfs.mqueue.queues_max = 256\r\nfs.mqueue.msg_max = 10\r\nfs.mqueue.msgsize_max = 8192\r\ndebug.exception-trace = 1\r\ndev.scsi.logging_level = 0\r\ndev.raid.speed_limit_min = 1000\r\ndev.raid.speed_limit_max = 200000\r\ndev.hpet.max-user-freq = 64\r\ndev.mac_hid.mouse_button_emulation = 0\r\ndev.mac_hid.mouse_button2_keycode = 97\r\ndev.mac_hid.mouse_button3_keycode = 100\r\ndev.cdrom.info = CD-ROM information, Id: cdrom.c 3.20 2003/12/17\r\ndev.cdrom.info =\r\ndev.cdrom.info = drive name:            sr0\r\ndev.cdrom.info = drive speed:           1\r\ndev.cdrom.info = drive # of slots:      1\r\ndev.cdrom.info = Can close tray:                1\r\ndev.cdrom.info = Can open tray:         1\r\ndev.cdrom.info = Can lock tray:         1\r\ndev.cdrom.info = Can change speed:      1\r\ndev.cdrom.info = Can select disk:       0\r\ndev.cdrom.info = Can read multisession: 1\r\ndev.cdrom.info = Can read MCN:          1\r\ndev.cdrom.info = Reports media changed: 1\r\ndev.cdrom.info = Can play audio:                1\r\ndev.cdrom.info = Can write CD-R:                0\r\ndev.cdrom.info = Can write CD-RW:       0\r\ndev.cdrom.info = Can read DVD:          0\r\ndev.cdrom.info = Can write DVD-R:       0\r\ndev.cdrom.info = Can write DVD-RAM:     0\r\ndev.cdrom.info = Can read MRW:          1\r\ndev.cdrom.info = Can write MRW:         1\r\ndev.cdrom.info = Can write RAM:         1\r\ndev.cdrom.info =\r\ndev.cdrom.info =\r\ndev.cdrom.autoclose = 1\r\ndev.cdrom.autoeject = 0\r\ndev.cdrom.debug = 0\r\ndev.cdrom.lock = 0\r\ndev.cdrom.check_media = 0\r\ndev.parport.default.timeslice = 200\r\ndev.parport.default.spintime = 500\r\ndev.parport.parport0.spintime = 500\r\ndev.parport.parport0.base-addr = 888    0\r\ndev.parport.parport0.irq = 7\r\ndev.parport.parport0.dma = -1\r\ndev.parport.parport0.modes = PCSPP,TRISTATE\r\ndev.parport.parport0.devices.active = none\r\ndev.parport.parport0.devices.lp.timeslice = 200\r\nerror: permission denied on key 'dev.parport.parport0.autoprobe'\r\nerror: permission denied on key 'dev.parport.parport0.autoprobe0'\r\nerror: permission denied on key 'dev.parport.parport0.autoprobe1'\r\nerror: permission denied on key 'dev.parport.parport0.autoprobe2'\r\nerror: permission denied on key 'dev.parport.parport0.autoprobe3'\r\nnet.netfilter.nf_log.0 = NONE\r\nnet.netfilter.nf_log.1 = NONE\r\nnet.netfilter.nf_log.2 = NONE\r\nnet.netfilter.nf_log.3 = NONE\r\nnet.netfilter.nf_log.4 = NONE\r\nnet.netfilter.nf_log.5 = NONE\r\nnet.netfilter.nf_log.6 = NONE\r\nnet.netfilter.nf_log.7 = NONE\r\nnet.netfilter.nf_log.8 = NONE\r\nnet.netfilter.nf_log.9 = NONE\r\nnet.netfilter.nf_log.10 = NONE\r\nnet.netfilter.nf_log.11 = NONE\r\nnet.netfilter.nf_log.12 = NONE\r\nnet.core.somaxconn = 128\r\nnet.core.xfrm_aevent_etime = 10\r\nnet.core.xfrm_aevent_rseqth = 2\r\nnet.core.xfrm_larval_drop = 1\r\nnet.core.xfrm_acq_expires = 30\r\nnet.core.wmem_max = 131071\r\nnet.core.rmem_max = 131071\r\nnet.core.wmem_default = 124928\r\nnet.core.rmem_default = 124928\r\nnet.core.dev_weight = 64\r\nnet.core.netdev_max_backlog = 1000\r\nnet.core.message_cost = 5\r\nnet.core.message_burst = 10\r\nnet.core.optmem_max = 20480\r\nnet.core.netdev_budget = 300\r\nnet.core.warnings = 1\r\nnet.ipv4.route.gc_thresh = 131072\r\nnet.ipv4.route.max_size = 2097152\r\nnet.ipv4.route.gc_min_interval = 0\r\nnet.ipv4.route.gc_min_interval_ms = 500\r\nnet.ipv4.route.gc_timeout = 300\r\nnet.ipv4.route.gc_interval = 60\r\nnet.ipv4.route.redirect_load = 2\r\nnet.ipv4.route.redirect_number = 9\r\nnet.ipv4.route.redirect_silence = 2048\r\nnet.ipv4.route.error_cost = 100\r\nnet.ipv4.route.error_burst = 500\r\nnet.ipv4.route.gc_elasticity = 8\r\nnet.ipv4.route.mtu_expires = 600\r\nnet.ipv4.route.min_pmtu = 552\r\nnet.ipv4.route.min_adv_mss = 256\r\nnet.ipv4.route.secret_interval = 600\r\nerror: permission denied on key 'net.ipv4.route.flush'\r\nnet.ipv4.neigh.default.mcast_solicit = 3\r\nnet.ipv4.neigh.default.ucast_solicit = 3\r\nnet.ipv4.neigh.default.app_solicit = 0\r\nnet.ipv4.neigh.default.retrans_time = 100\r\nnet.ipv4.neigh.default.base_reachable_time = 30\r\nnet.ipv4.neigh.default.delay_first_probe_time = 5\r\nnet.ipv4.neigh.default.gc_stale_time = 60\r\nnet.ipv4.neigh.default.unres_qlen = 3\r\nnet.ipv4.neigh.default.proxy_qlen = 64\r\nnet.ipv4.neigh.default.anycast_delay = 100\r\nnet.ipv4.neigh.default.proxy_delay = 80\r\nnet.ipv4.neigh.default.locktime = 100\r\nnet.ipv4.neigh.default.retrans_time_ms = 1000\r\nnet.ipv4.neigh.default.base_reachable_time_ms = 30000\r\nnet.ipv4.neigh.default.gc_interval = 30\r\nnet.ipv4.neigh.default.gc_thresh1 = 128\r\nnet.ipv4.neigh.default.gc_thresh2 = 512\r\nnet.ipv4.neigh.default.gc_thresh3 = 1024\r\nnet.ipv4.neigh.lo.mcast_solicit = 3\r\nnet.ipv4.neigh.lo.ucast_solicit = 3\r\nnet.ipv4.neigh.lo.app_solicit = 0\r\nnet.ipv4.neigh.lo.retrans_time = 100\r\nnet.ipv4.neigh.lo.base_reachable_time = 30\r\nnet.ipv4.neigh.lo.delay_first_probe_time = 5\r\nnet.ipv4.neigh.lo.gc_stale_time = 60\r\nnet.ipv4.neigh.lo.unres_qlen = 3\r\nnet.ipv4.neigh.lo.proxy_qlen = 64\r\nnet.ipv4.neigh.lo.anycast_delay = 100\r\nnet.ipv4.neigh.lo.proxy_delay = 80\r\nnet.ipv4.neigh.lo.locktime = 100\r\nnet.ipv4.neigh.lo.retrans_time_ms = 1000\r\nnet.ipv4.neigh.lo.base_reachable_time_ms = 30000\r\nnet.ipv4.neigh.eth0.mcast_solicit = 3\r\nnet.ipv4.neigh.eth0.ucast_solicit = 3\r\nnet.ipv4.neigh.eth0.app_solicit = 0\r\nnet.ipv4.neigh.eth0.retrans_time = 100\r\nnet.ipv4.neigh.eth0.base_reachable_time = 30\r\nnet.ipv4.neigh.eth0.delay_first_probe_time = 5\r\nnet.ipv4.neigh.eth0.gc_stale_time = 60\r\nnet.ipv4.neigh.eth0.unres_qlen = 3\r\nnet.ipv4.neigh.eth0.proxy_qlen = 64\r\nnet.ipv4.neigh.eth0.anycast_delay = 100\r\nnet.ipv4.neigh.eth0.proxy_delay = 80\r\nnet.ipv4.neigh.eth0.locktime = 100\r\nnet.ipv4.neigh.eth0.retrans_time_ms = 1000\r\nnet.ipv4.neigh.eth0.base_reachable_time_ms = 30000\r\nnet.ipv4.tcp_timestamps = 1\r\nnet.ipv4.tcp_window_scaling = 1\r\nnet.ipv4.tcp_sack = 1\r\nnet.ipv4.tcp_retrans_collapse = 1\r\nnet.ipv4.ip_default_ttl = 64\r\nnet.ipv4.ip_no_pmtu_disc = 0\r\nnet.ipv4.ip_nonlocal_bind = 0\r\nnet.ipv4.tcp_syn_retries = 5\r\nnet.ipv4.tcp_synack_retries = 5\r\nnet.ipv4.tcp_max_orphans = 262144\r\nnet.ipv4.tcp_max_tw_buckets = 262144\r\nnet.ipv4.ip_dynaddr = 0\r\nnet.ipv4.tcp_keepalive_time = 7200\r\nnet.ipv4.tcp_keepalive_probes = 9\r\nnet.ipv4.tcp_keepalive_intvl = 75\r\nnet.ipv4.tcp_retries1 = 3\r\nnet.ipv4.tcp_retries2 = 15\r\nnet.ipv4.tcp_fin_timeout = 60\r\nnet.ipv4.tcp_syncookies = 1\r\nnet.ipv4.tcp_tw_recycle = 0\r\nnet.ipv4.tcp_abort_on_overflow = 0\r\nnet.ipv4.tcp_stdurg = 0\r\nnet.ipv4.tcp_rfc1337 = 0\r\nnet.ipv4.tcp_max_syn_backlog = 2048\r\nnet.ipv4.ip_local_port_range = 32768    61000\r\nnet.ipv4.igmp_max_memberships = 20\r\nnet.ipv4.igmp_max_msf = 10\r\nnet.ipv4.inet_peer_threshold = 65664\r\nnet.ipv4.inet_peer_minttl = 120\r\nnet.ipv4.inet_peer_maxttl = 600\r\nnet.ipv4.inet_peer_gc_mintime = 10\r\nnet.ipv4.inet_peer_gc_maxtime = 120\r\nnet.ipv4.tcp_orphan_retries = 0\r\nnet.ipv4.tcp_fack = 1\r\nnet.ipv4.tcp_reordering = 3\r\nnet.ipv4.tcp_ecn = 2\r\nnet.ipv4.tcp_dsack = 1\r\nnet.ipv4.tcp_mem = 375072       500096  750144\r\nnet.ipv4.tcp_wmem = 4096        16384   4194304\r\nnet.ipv4.tcp_rmem = 4096        87380   4194304\r\nnet.ipv4.tcp_app_win = 31\r\nnet.ipv4.tcp_adv_win_scale = 2\r\nnet.ipv4.tcp_tw_reuse = 0\r\nnet.ipv4.tcp_frto = 2\r\nnet.ipv4.tcp_frto_response = 0\r\nnet.ipv4.tcp_low_latency = 0\r\nnet.ipv4.tcp_no_metrics_save = 0\r\nnet.ipv4.tcp_moderate_rcvbuf = 1\r\nnet.ipv4.tcp_tso_win_divisor = 3\r\nnet.ipv4.tcp_congestion_control = cubic\r\nnet.ipv4.tcp_abc = 0\r\nnet.ipv4.tcp_mtu_probing = 0\r\nnet.ipv4.tcp_base_mss = 512\r\nnet.ipv4.tcp_workaround_signed_windows = 0\r\nnet.ipv4.tcp_dma_copybreak = 4096\r\nnet.ipv4.tcp_slow_start_after_idle = 1\r\nnet.ipv4.cipso_cache_enable = 1\r\nnet.ipv4.cipso_cache_bucket_size = 10\r\nnet.ipv4.cipso_rbm_optfmt = 0\r\nnet.ipv4.cipso_rbm_strictvalid = 1\r\nnet.ipv4.tcp_available_congestion_control = cubic reno\r\nnet.ipv4.tcp_allowed_congestion_control = cubic reno\r\nnet.ipv4.tcp_max_ssthresh = 0\r\nnet.ipv4.udp_mem = 375072       500096  750144\r\nnet.ipv4.udp_rmem_min = 4096\r\nnet.ipv4.udp_wmem_min = 4096\r\nnet.ipv4.conf.all.forwarding = 0\r\nnet.ipv4.conf.all.mc_forwarding = 0\r\nnet.ipv4.conf.all.accept_redirects = 1\r\nnet.ipv4.conf.all.secure_redirects = 1\r\nnet.ipv4.conf.all.shared_media = 1\r\nnet.ipv4.conf.all.rp_filter = 1\r\nnet.ipv4.conf.all.send_redirects = 1\r\nnet.ipv4.conf.all.accept_source_route = 0\r\nnet.ipv4.conf.all.src_valid_mark = 0\r\nnet.ipv4.conf.all.proxy_arp = 0\r\nnet.ipv4.conf.all.medium_id = 0\r\nnet.ipv4.conf.all.bootp_relay = 0\r\nnet.ipv4.conf.all.log_martians = 0\r\nnet.ipv4.conf.all.tag = 0\r\nnet.ipv4.conf.all.arp_filter = 0\r\nnet.ipv4.conf.all.arp_announce = 0\r\nnet.ipv4.conf.all.arp_ignore = 0\r\nnet.ipv4.conf.all.arp_accept = 0\r\nnet.ipv4.conf.all.arp_notify = 0\r\nnet.ipv4.conf.all.disable_xfrm = 0\r\nnet.ipv4.conf.all.disable_policy = 0\r\nnet.ipv4.conf.all.force_igmp_version = 0\r\nnet.ipv4.conf.all.promote_secondaries = 0\r\nnet.ipv4.conf.default.forwarding = 0\r\nnet.ipv4.conf.default.mc_forwarding = 0\r\nnet.ipv4.conf.default.accept_redirects = 1\r\nnet.ipv4.conf.default.secure_redirects = 1\r\nnet.ipv4.conf.default.shared_media = 1\r\nnet.ipv4.conf.default.rp_filter = 1\r\nnet.ipv4.conf.default.send_redirects = 1\r\nnet.ipv4.conf.default.accept_source_route = 1\r\nnet.ipv4.conf.default.src_valid_mark = 0\r\nnet.ipv4.conf.default.proxy_arp = 0\r\nnet.ipv4.conf.default.medium_id = 0\r\nnet.ipv4.conf.default.bootp_relay = 0\r\nnet.ipv4.conf.default.log_martians = 0\r\nnet.ipv4.conf.default.tag = 0\r\nnet.ipv4.conf.default.arp_filter = 0\r\nnet.ipv4.conf.default.arp_announce = 0\r\nnet.ipv4.conf.default.arp_ignore = 0\r\nnet.ipv4.conf.default.arp_accept = 0\r\nnet.ipv4.conf.default.arp_notify = 0\r\nnet.ipv4.conf.default.disable_xfrm = 0\r\nnet.ipv4.conf.default.disable_policy = 0\r\nnet.ipv4.conf.default.force_igmp_version = 0\r\nnet.ipv4.conf.default.promote_secondaries = 0\r\nnet.ipv4.conf.lo.forwarding = 0\r\nnet.ipv4.conf.lo.mc_forwarding = 0\r\nnet.ipv4.conf.lo.accept_redirects = 1\r\nnet.ipv4.conf.lo.secure_redirects = 1\r\nnet.ipv4.conf.lo.shared_media = 1\r\nnet.ipv4.conf.lo.rp_filter = 1\r\nnet.ipv4.conf.lo.send_redirects = 1\r\nnet.ipv4.conf.lo.accept_source_route = 1\r\nnet.ipv4.conf.lo.src_valid_mark = 0\r\nnet.ipv4.conf.lo.proxy_arp = 0\r\nnet.ipv4.conf.lo.medium_id = 0\r\nnet.ipv4.conf.lo.bootp_relay = 0\r\nnet.ipv4.conf.lo.log_martians = 0\r\nnet.ipv4.conf.lo.tag = 0\r\nnet.ipv4.conf.lo.arp_filter = 0\r\nnet.ipv4.conf.lo.arp_announce = 0\r\nnet.ipv4.conf.lo.arp_ignore = 0\r\nnet.ipv4.conf.lo.arp_accept = 0\r\nnet.ipv4.conf.lo.arp_notify = 0\r\nnet.ipv4.conf.lo.disable_xfrm = 1\r\nnet.ipv4.conf.lo.disable_policy = 1\r\nnet.ipv4.conf.lo.force_igmp_version = 0\r\nnet.ipv4.conf.lo.promote_secondaries = 0\r\nnet.ipv4.conf.eth0.forwarding = 0\r\nnet.ipv4.conf.eth0.mc_forwarding = 0\r\nnet.ipv4.conf.eth0.accept_redirects = 1\r\nnet.ipv4.conf.eth0.secure_redirects = 1\r\nnet.ipv4.conf.eth0.shared_media = 1\r\nnet.ipv4.conf.eth0.rp_filter = 1\r\nnet.ipv4.conf.eth0.send_redirects = 1\r\nnet.ipv4.conf.eth0.accept_source_route = 1\r\nnet.ipv4.conf.eth0.src_valid_mark = 0\r\nnet.ipv4.conf.eth0.proxy_arp = 0\r\nnet.ipv4.conf.eth0.medium_id = 0\r\nnet.ipv4.conf.eth0.bootp_relay = 0\r\nnet.ipv4.conf.eth0.log_martians = 0\r\nnet.ipv4.conf.eth0.tag = 0\r\nnet.ipv4.conf.eth0.arp_filter = 0\r\nnet.ipv4.conf.eth0.arp_announce = 0\r\nnet.ipv4.conf.eth0.arp_ignore = 0\r\nnet.ipv4.conf.eth0.arp_accept = 0\r\nnet.ipv4.conf.eth0.arp_notify = 0\r\nnet.ipv4.conf.eth0.disable_xfrm = 0\r\nnet.ipv4.conf.eth0.disable_policy = 0\r\nnet.ipv4.conf.eth0.force_igmp_version = 0\r\nnet.ipv4.conf.eth0.promote_secondaries = 0\r\nnet.ipv4.ip_forward = 0\r\nnet.ipv4.xfrm4_gc_thresh = 1048576\r\nnet.ipv4.ipfrag_high_thresh = 262144\r\nnet.ipv4.ipfrag_low_thresh = 196608\r\nnet.ipv4.ipfrag_time = 30\r\nnet.ipv4.icmp_echo_ignore_all = 0\r\nnet.ipv4.icmp_echo_ignore_broadcasts = 1\r\nnet.ipv4.icmp_ignore_bogus_error_responses = 1\r\nnet.ipv4.icmp_errors_use_inbound_ifaddr = 0\r\nnet.ipv4.icmp_ratelimit = 1000\r\nnet.ipv4.icmp_ratemask = 6168\r\nnet.ipv4.rt_cache_rebuild_count = 4\r\nnet.ipv4.ipfrag_secret_interval = 600\r\nnet.ipv4.ipfrag_max_dist = 64\r\nnet.token-ring.rif_timeout = 60000\r\nnet.ipv6.neigh.default.mcast_solicit = 3\r\nnet.ipv6.neigh.default.ucast_solicit = 3\r\nnet.ipv6.neigh.default.app_solicit = 0\r\nnet.ipv6.neigh.default.retrans_time = 100\r\nnet.ipv6.neigh.default.base_reachable_time = 30\r\nnet.ipv6.neigh.default.delay_first_probe_time = 5\r\nnet.ipv6.neigh.default.gc_stale_time = 60\r\nnet.ipv6.neigh.default.unres_qlen = 3\r\nnet.ipv6.neigh.default.proxy_qlen = 64\r\nnet.ipv6.neigh.default.anycast_delay = 100\r\nnet.ipv6.neigh.default.proxy_delay = 80\r\nnet.ipv6.neigh.default.locktime = 0\r\nnet.ipv6.neigh.default.retrans_time_ms = 1000\r\nnet.ipv6.neigh.default.base_reachable_time_ms = 30000\r\nnet.ipv6.neigh.default.gc_interval = 30\r\nnet.ipv6.neigh.default.gc_thresh1 = 128\r\nnet.ipv6.neigh.default.gc_thresh2 = 512\r\nnet.ipv6.neigh.default.gc_thresh3 = 1024\r\nnet.ipv6.neigh.lo.mcast_solicit = 3\r\nnet.ipv6.neigh.lo.ucast_solicit = 3\r\nnet.ipv6.neigh.lo.app_solicit = 0\r\nnet.ipv6.neigh.lo.retrans_time = 100\r\nnet.ipv6.neigh.lo.base_reachable_time = 30\r\nnet.ipv6.neigh.lo.delay_first_probe_time = 5\r\nnet.ipv6.neigh.lo.gc_stale_time = 60\r\nnet.ipv6.neigh.lo.unres_qlen = 3\r\nnet.ipv6.neigh.lo.proxy_qlen = 64\r\nnet.ipv6.neigh.lo.anycast_delay = 100\r\nnet.ipv6.neigh.lo.proxy_delay = 80\r\nnet.ipv6.neigh.lo.locktime = 0\r\nnet.ipv6.neigh.lo.retrans_time_ms = 1000\r\nnet.ipv6.neigh.lo.base_reachable_time_ms = 30000\r\nnet.ipv6.neigh.eth0.mcast_solicit = 3\r\nnet.ipv6.neigh.eth0.ucast_solicit = 3\r\nnet.ipv6.neigh.eth0.app_solicit = 0\r\nnet.ipv6.neigh.eth0.retrans_time = 100\r\nnet.ipv6.neigh.eth0.base_reachable_time = 30\r\nnet.ipv6.neigh.eth0.delay_first_probe_time = 5\r\nnet.ipv6.neigh.eth0.gc_stale_time = 60\r\nnet.ipv6.neigh.eth0.unres_qlen = 3\r\nnet.ipv6.neigh.eth0.proxy_qlen = 64\r\nnet.ipv6.neigh.eth0.anycast_delay = 100\r\nnet.ipv6.neigh.eth0.proxy_delay = 80\r\nnet.ipv6.neigh.eth0.locktime = 0\r\nnet.ipv6.neigh.eth0.retrans_time_ms = 1000\r\nnet.ipv6.neigh.eth0.base_reachable_time_ms = 30000\r\nnet.ipv6.xfrm6_gc_thresh = 2048\r\nnet.ipv6.conf.all.forwarding = 0\r\nnet.ipv6.conf.all.hop_limit = 64\r\nnet.ipv6.conf.all.mtu = 1280\r\nnet.ipv6.conf.all.accept_ra = 1\r\nnet.ipv6.conf.all.accept_redirects = 1\r\nnet.ipv6.conf.all.autoconf = 1\r\nnet.ipv6.conf.all.dad_transmits = 1\r\nnet.ipv6.conf.all.router_solicitations = 3\r\nnet.ipv6.conf.all.router_solicitation_interval = 4\r\nnet.ipv6.conf.all.router_solicitation_delay = 1\r\nnet.ipv6.conf.all.force_mld_version = 0\r\nnet.ipv6.conf.all.use_tempaddr = 0\r\nnet.ipv6.conf.all.temp_valid_lft = 604800\r\nnet.ipv6.conf.all.temp_prefered_lft = 86400\r\nnet.ipv6.conf.all.regen_max_retry = 5\r\nnet.ipv6.conf.all.max_desync_factor = 600\r\nnet.ipv6.conf.all.max_addresses = 16\r\nnet.ipv6.conf.all.accept_ra_defrtr = 1\r\nnet.ipv6.conf.all.accept_ra_pinfo = 1\r\nnet.ipv6.conf.all.proxy_ndp = 0\r\nnet.ipv6.conf.all.accept_source_route = 0\r\nnet.ipv6.conf.all.disable_ipv6 = 0\r\nnet.ipv6.conf.all.accept_dad = 1\r\nnet.ipv6.conf.default.forwarding = 0\r\nnet.ipv6.conf.default.hop_limit = 64\r\nnet.ipv6.conf.default.mtu = 1280\r\nnet.ipv6.conf.default.accept_ra = 1\r\nnet.ipv6.conf.default.accept_redirects = 1\r\nnet.ipv6.conf.default.autoconf = 1\r\nnet.ipv6.conf.default.dad_transmits = 1\r\nnet.ipv6.conf.default.router_solicitations = 3\r\nnet.ipv6.conf.default.router_solicitation_interval = 4\r\nnet.ipv6.conf.default.router_solicitation_delay = 1\r\nnet.ipv6.conf.default.force_mld_version = 0\r\nnet.ipv6.conf.default.use_tempaddr = 0\r\nnet.ipv6.conf.default.temp_valid_lft = 604800\r\nnet.ipv6.conf.default.temp_prefered_lft = 86400\r\nnet.ipv6.conf.default.regen_max_retry = 5\r\nnet.ipv6.conf.default.max_desync_factor = 600\r\nnet.ipv6.conf.default.max_addresses = 16\r\nnet.ipv6.conf.default.accept_ra_defrtr = 1\r\nnet.ipv6.conf.default.accept_ra_pinfo = 1\r\nnet.ipv6.conf.default.proxy_ndp = 0\r\nnet.ipv6.conf.default.accept_source_route = 0\r\nnet.ipv6.conf.default.disable_ipv6 = 0\r\nnet.ipv6.conf.default.accept_dad = 1\r\nnet.ipv6.conf.lo.forwarding = 0\r\nnet.ipv6.conf.lo.hop_limit = 64\r\nnet.ipv6.conf.lo.mtu = 16436\r\nnet.ipv6.conf.lo.accept_ra = 1\r\nnet.ipv6.conf.lo.accept_redirects = 1\r\nnet.ipv6.conf.lo.autoconf = 1\r\nnet.ipv6.conf.lo.dad_transmits = 1\r\nnet.ipv6.conf.lo.router_solicitations = 3\r\nnet.ipv6.conf.lo.router_solicitation_interval = 4\r\nnet.ipv6.conf.lo.router_solicitation_delay = 1\r\nnet.ipv6.conf.lo.force_mld_version = 0\r\nnet.ipv6.conf.lo.use_tempaddr = -1\r\nnet.ipv6.conf.lo.temp_valid_lft = 604800\r\nnet.ipv6.conf.lo.temp_prefered_lft = 86400\r\nnet.ipv6.conf.lo.regen_max_retry = 5\r\nnet.ipv6.conf.lo.max_desync_factor = 600\r\nnet.ipv6.conf.lo.max_addresses = 16\r\nnet.ipv6.conf.lo.accept_ra_defrtr = 1\r\nnet.ipv6.conf.lo.accept_ra_pinfo = 1\r\nnet.ipv6.conf.lo.proxy_ndp = 0\r\nnet.ipv6.conf.lo.accept_source_route = 0\r\nnet.ipv6.conf.lo.disable_ipv6 = 0\r\nnet.ipv6.conf.lo.accept_dad = -1\r\nnet.ipv6.conf.eth0.forwarding = 0\r\nnet.ipv6.conf.eth0.hop_limit = 64\r\nnet.ipv6.conf.eth0.mtu = 1500\r\nnet.ipv6.conf.eth0.accept_ra = 1\r\nnet.ipv6.conf.eth0.accept_redirects = 1\r\nnet.ipv6.conf.eth0.autoconf = 1\r\nnet.ipv6.conf.eth0.dad_transmits = 1\r\nnet.ipv6.conf.eth0.router_solicitations = 3\r\nnet.ipv6.conf.eth0.router_solicitation_interval = 4\r\nnet.ipv6.conf.eth0.router_solicitation_delay = 1\r\nnet.ipv6.conf.eth0.force_mld_version = 0\r\nnet.ipv6.conf.eth0.use_tempaddr = 0\r\nnet.ipv6.conf.eth0.temp_valid_lft = 604800\r\nnet.ipv6.conf.eth0.temp_prefered_lft = 86400\r\nnet.ipv6.conf.eth0.regen_max_retry = 5\r\nnet.ipv6.conf.eth0.max_desync_factor = 600\r\nnet.ipv6.conf.eth0.max_addresses = 16\r\nnet.ipv6.conf.eth0.accept_ra_defrtr = 1\r\nnet.ipv6.conf.eth0.accept_ra_pinfo = 1\r\nnet.ipv6.conf.eth0.proxy_ndp = 0\r\nnet.ipv6.conf.eth0.accept_source_route = 0\r\nnet.ipv6.conf.eth0.disable_ipv6 = 0\r\nnet.ipv6.conf.eth0.accept_dad = 1\r\nnet.ipv6.ip6frag_high_thresh = 262144\r\nnet.ipv6.ip6frag_low_thresh = 196608\r\nnet.ipv6.ip6frag_time = 60\r\nerror: permission denied on key 'net.ipv6.route.flush'\r\nnet.ipv6.route.gc_thresh = 1024\r\nnet.ipv6.route.max_size = 4096\r\nnet.ipv6.route.gc_min_interval = 0\r\nnet.ipv6.route.gc_timeout = 60\r\nnet.ipv6.route.gc_interval = 30\r\nnet.ipv6.route.gc_elasticity = 0\r\nnet.ipv6.route.mtu_expires = 600\r\nnet.ipv6.route.min_adv_mss = 12\r\nnet.ipv6.route.gc_min_interval_ms = 500\r\nnet.ipv6.icmp.ratelimit = 1000\r\nnet.ipv6.bindv6only = 0\r\nnet.ipv6.ip6frag_secret_interval = 600\r\nnet.ipv6.mld_max_msf = 64\r\nnet.unix.max_dgram_qlen = 10\r\nabi.vsyscall32 = 1\r\ncrypto.fips_enabled = 0\r\n\r\n\r\n-------------\r\nMy another post in Google regarding hang up:\r\nhttp://groups.google.com/group/nodejs/browse_thread/thread/9189df2597aa199e/b83b16c08a051706?lnk=gst&q=hang+up#b83b16c08a051706\r\n\r\n\r\n\r\n\r\n\r\n","comments":35,"title":"Bug:  http.request socket hang up problem","updated_at":"2011-10-14T00:29:57Z","url":"https://api.github.com/repos/joyent/node/issues/1176","id":1050452,"assignee":null,"milestone":null,"closed_at":"2011-09-14T20:23:58Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/3cc333b173e35a82fd27b52e71c50496?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3cc333b173e35a82fd27b52e71c50496","url":"https://api.github.com/users/murvinlai","id":593935,"login":"murvinlai"},"html_url":"https://github.com/joyent/node/issues/1176","labels":[{"name":"http","url":"https://api.github.com/repos/joyent/node/labels/http","color":"e10c02"}],"state":"closed"},"legacy":{"issue_id":1050452,"comment_id":2402067}}