[Catalyst] Testing server hangs with Safari and some others
Jonathan Rockway
jon at jrock.us
Wed Jul 26 19:03:06 CEST 2006
Thanks for the info on the CGI. Has a bug been filed for this yet, or
should I report one?
I don't think your network issue is related to Safari. Try using nc:
$ nc localhost 3000
GET /
< response from catalyst >
This cuts out HTTP/1.1 and any other "overhead" that a real web browser
adds. I bet, though, that this hangs too. Try running under the profiler:
$ perl -d:DProf script/myapp_server.pl
If you manage to get good profile data, you should see one sub taking a
lot of "real" time, and then you know where the bug is.
Unfortunately, DProf *loses data* if you kill the program with C-c, so
this might not help detect the hang at all. There are apparently other
profilers, but none of those work with Catalyst:
$ perl -d:Profile script/blog_server.pl
Died at /usr/lib/perl5/site_perl/5.8/Template/Timer.pm line 63.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8/Catalyst/View/TT.pm line 6.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8/Catalyst/View/TT.pm line 6.
Compilation failed in require at (eval
51)[/usr/lib/perl5/5.8/base.pm:82] line 3.
...propagated at /usr/lib/perl5/5.8/base.pm line 85.
BEGIN failed--compilation aborted at /cygdrive/c/Documents and
Settings/jrockway/blog_software/scrip
t/../lib/Blog/View/HTML.pm line 4.
Compilation failed in require at (eval
50)[/usr/lib/perl5/site_perl/5.8/Catalyst/Utils.pm:252] line
3.
Compilation failed in require at script/blog_server.pl line 52.
:)
DProf doesn't work for me either, because Math::Pari is very broken and
DProf agitates its brokenness. *sigh* again :)
(BTW, sorry my first few posts to the list are so cynical. It's just
that I spend a good precentage of my life with Catalyst and Perl so I've
obviously had a chance to discover weird corner cases that cause
annoyance. Actually, none of the bugs are Catalyst bugs, they're TT or
Crypt::OpenPGP/Crypt::Random/Math::Pari bugs. Glad to know they're
software bugs and not user error on my part, though. :)
Anyway, hope this helps somewhat. :)
Regards,
Jonathan Rockway
apv wrote:
> Hmmm. I'm not using CGI (it hangs on the most minimal
> install/welcome-page) and I have the most recent regular TT2 release.
>
> I'm glad you mention it though b/c I did have the problem you list with
> another TT2 form (not in Catalyst) and I found on antoher list that
> naming the CGI instance or calling it with a namespace fixed the
> hanging. [% USE CGI(foo) %] or [% USE mycgi = CGI(foo) %].
>
> http://www.template-toolkit.org/pipermail/templates/2002-May/003242.html
>
> I wrote a chat server about 4 years ago that had the same problem of
> hanging on Safari but not on the others. I can't remember how I solved
> it now but there was something different about the way Safari handled
> the socket blocking on reads between headers and body, I think. I'll
> try to dig up that code and compare it to the test server code.
>
> -Ashley
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 368 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060726/55a21173/attachment-0001.pgp
More information about the Catalyst
mailing list