node.js写的程序。进程似乎没有在运行,卡住了!下面是strace 命令的信息
用node.js做的抓取,进程不运行了。
[root@localhost test]# strace -p 8926 Process 8926 attached - interrupt to quit clock_gettime(CLOCK_MONOTONIC, {75769, 817366105}) = 0 epoll_wait(3, {{EPOLLIN, {u32=8, u64=6751688589320}}}, 64, 2147483648) = 1 read(8, "", 65536) = 0 futex(0xcf4a5f8, FUTEX_WAKE_PRIVATE, 1) = 1 close(8) = 0 write(1, "Re-connecting lost connection: E"..., 337) = 337 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 8 ioctl(8, FIONBIO, [1]) = 0 fcntl(8, F_SETFD, FD_CLOEXEC) = 0 setsockopt(8, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 connect(8, {sa_family=AF_INET, sin_port=htons(3306), sin_addr=inet_addr("192.168.1.30")}, 16) = -1 EINPROGRESS (Operation now in progress) clock_gettime(CLOCK_MONOTONIC, {75851, 180664105}) = 0 epoll_ctl(3, EPOLL_CTL_MOD, 8, {EPOLLOUT, {u32=8, u64=6755983556616}}) = -1 ENOENT (No such file or directory) epoll_ctl(3, EPOLL_CTL_ADD, 8, {EPOLLOUT, {u32=8, u64=6755983556616}}) = 0 epoll_wait(3, {{EPOLLOUT, {u32=8, u64=6755983556616}}}, 64, 2147483648) = 1 getsockopt(8, SOL_SOCKET, SO_ERROR, [8589934592], [4]) = 0 clock_gettime(CLOCK_MONOTONIC, {75851, 180953105}) = 0 epoll_ctl(3, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLOUT, {u32=8, u64=6760278523912}}) = 0 epoll_wait(3, {{EPOLLIN|EPOLLOUT, {u32=8, u64=6760278523912}}}, 64, 5000) = 1 read(8, ":n5.5.3-m3-logv9<I9">PVA377"..., 65536) = 62 write(8, ";13173632!"..., 63) = 63 clock_gettime(CLOCK_MONOTONIC, {75851, 181554105}) = 0 epoll_ctl(3, EPOLL_CTL_MOD, 8, {EPOLLIN, {u32=8, u64=6764573491208}}) = 0 epoll_wait(3, {{EPOLLIN, {u32=8, u64=6764573491208}}}, 64, 4999) = 1 read(8, "722", 65536) = 11 clock_gettime(CLOCK_MONOTONIC, {75851, 181863105}) = 0 epoll_wait(3, {}, 64, 4999) = 0 clock_gettime(CLOCK_MONOTONIC, {75856, 180559105}) = 0 epoll_wait(3, {{EPOLLIN, {u32=8, u64=6764573491208}}}, 64, 2147483648) = 1 read(8, "", 65536) = 0 futex(0xcf4a5f8, FUTEX_WAKE_PRIVATE, 1) = 1 close(8) = 0 write(1, "Re-connecting lost connection: E"..., 337) = 337 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 8 ioctl(8, FIONBIO, [1]) = 0 fcntl(8, F_SETFD, FD_CLOEXEC) = 0
read(8, ":n5.5.3-m3-logv9<I9">PVA377"..., 65536) = 62这个段我怎么感觉像是跟数据库有关?可我没有操作mysql
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
同时批量抓取2000个网址。 这样的进程有10来个,很多请求都终都超时了。,进程会一直卡在epoll_wait(3, 这里
你用什么来设置抓取的时间间隔
可能跟ulimit 有关,现在有些进程会等待 epoll_wait(3,
不贴代码谁知道你想干嘛