[Cgi-session-user] CGI::Session hangs (but probably some other component is to blame)
Brought to you by:
sherzodr
From: David L. <dav...@ya...> - 2015-05-10 19:02:29
|
I have some web sites that use CGI:: Session to maintain state information (so user can log in). Occasionally, a user requests a web page and does not get a response because the CGI script gets stuck somewhere. I added a call to alarm(100) at the start of my CGI script to send the SIGALRM signal after 100 seconds. The subroutine that catches the alarm prints diagnostic information to a log file (see below). It appears that CGI::Session is getting stuck in XSLoader.pm. As is clear from the log file, the CGI script is running under NetBSD with Perl 5.14.2. I only have a limited understanding of what the dynamic loader is doing. I welcome any suggestions that would help me avoid this problem. My guess is that this a NetBSD issue--I am considering (for other reasons) using a different hosting service where the OS would be a version of Linux. Do you think that would be an improvement? Here is the raw output from the log file: !Sun May 10 09:30:25 2015: 'This page is taking too long to load--something is wrong.' !Called from package Debug, file /htdocs/userdirs/levner/orgs-dev/lib/releases/20150417-p20150304/Debug.pm, subroutine DB::stack_output(), line 502. Called from package CGILogin::Util, file /htdocs/userdirs/levner/orgs-dev/lib/releases/20150417-p20150304/CGILogin/Util.pm, subroutine Debug::must_print_stack(), line 179. Called from package CGILogin::Util, file /htdocs/userdirs/levner/orgs-dev/lib/releases/20150417-p20150304/CGILogin/Util.pm, subroutine CGILogin::Util::handle_web_errors('This page is taking too long to load--something is wrong.'), line 268. Called from package DynaLoader, file /usr/local/lib/perl5/5.14.2/XSLoader.pm, subroutine CGILogin::Util::catch_alarm('ALRM'), line 95. Called from package DynaLoader, file /usr/local/lib/perl5/5.14.2/XSLoader.pm, subroutine (eval)('ALRM'), line 95. Called from package B, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine XSLoader::load('B'), line 27. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine B::BEGIN(), line 28. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine (eval)(), line 28. Called from package Safe, file /usr/local/lib/perl5/5.14.2/Safe.pm, subroutine (eval)(), line 34. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine Safe::BEGIN(), line 28. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine (eval)(), line 28. Called from package CGI::Session::Serialize::Default, file ../foreign-lib/CGI/Session/Serialize/Default.pm, subroutine (eval)(), line 5. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine CGI::Session::Serialize::Default::BEGIN(), line 28. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine (eval)(), line 28. Called from package base, file (eval 33), subroutine (eval)(), line 2. Called from package base, file /usr/local/lib/perl5/5.14.2/base.pm, subroutine (eval)(), line 91. Called from package CGI::Session::File, file ../foreign-lib/CGI/Session/File.pm, subroutine base::import('base', 'CGI::Session', 'CGI::Session::ID::MD5', 'CGI::Session::Serialize::Default'), line 8. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine CGI::Session::File::BEGIN(), line 28. Called from package main, file /usr/local/lib/perl5/5.14.2/i386-netbsd/B.pm, subroutine (eval)(), line 28. Called from package CGI::Session, file (eval 31), subroutine (eval)(), line 2. Called from package CGI::Session, file ../foreign-lib/CGI/Session.pm, subroutine (eval)(), line 98. Called from package CGI::Session, file ../foreign-lib/CGI/Session.pm, subroutine CGI::Session::api_3('CGI::Session', 'driver:File', '', ['Directory' => 'sessions']), line 50. Called from package CGILogin, file /htdocs/userdirs/levner/orgs-dev/lib/releases/20150417-p20150304/CGILogin.pm, subroutine CGI::Session::new('CGI::Session', 'driver:File', '', ['Directory' => 'sessions']), line 326. Called from package main, file index.cgi, subroutine CGILogin::new('CGILogin'), line 260. David |