elgato has asked for the wisdom of the Perl Monks concerning the following question:
The question is, my code should run all the time, but after running for a few hours or even hour it freezes. No CPU usage, no activity at all, like it's sleeping. This runs perl 5.16.1, latest Core, LWP. I'm wondering how to get know what is the reason for that freeze, how to know where it stopped? PS: i'm querying https host, if that matters. Addon: running strace gives this as last lines berofe freeze:my @requests; while ( ... ) { push @requests, ...; if (scalar @requests % 3 == 0) { &doRequests(\@requests); } } sub doRequests { my $requests = shift; my @coro = map { async { # here we get LWP::UserAgent object and to request } } @$requests; }
What does this mean?rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1211417888, 0}, {1211354002, 168413065}) = ? ERESTART_RESTA +RTBLOCK (To be restarted) --- SIGWINCH (Window changed) @ 0 (0) --- restart_syscall(<... resuming interrupted call ...>) = ? ERESTART_REST +ARTBLOCK (To be restarted) --- SIGWINCH (Window changed) @ 0 (0) --- restart_syscall(<... resuming interrupted call ...>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Coro + LWP freezes (*trace)
by tye (Sage) on Aug 25, 2012 at 21:08 UTC | |
by elgato (Novice) on Aug 26, 2012 at 07:26 UTC | |
by tye (Sage) on Aug 26, 2012 at 15:49 UTC | |
by elgato (Novice) on Aug 27, 2012 at 16:11 UTC | |
|
Re: Coro + LWP freezes
by Corion (Patriarch) on Aug 25, 2012 at 23:55 UTC | |
by elgato (Novice) on Aug 26, 2012 at 07:27 UTC | |
by Corion (Patriarch) on Aug 26, 2012 at 09:00 UTC | |
by elgato (Novice) on Aug 26, 2012 at 09:05 UTC | |
by Corion (Patriarch) on Aug 26, 2012 at 09:59 UTC | |
|
Re: Coro + LWP freezes
by philiprbrenan (Monk) on Aug 25, 2012 at 23:54 UTC | |
by elgato (Novice) on Aug 26, 2012 at 13:34 UTC |