Fri Jul 9 20:58:34 2004
Debugging Strange ProblemsProblemYou have strage problems: When you repeatedly load one of your pages, sometimes a bug appears, sometimes it doesn't. Or, your page is somehow remembering values from a previous request although it shouldn't. SolutionI assume you are already running with AxNoCache on. If not, do so now. The cache can ruin all your tries to check the bug. So check that the cache is really not used. Remove the cache directory contents. Check that the cache directory is still empty after a few requests. Check the error log for cache messages. First of all, make sure you don't use %ENV. Use $r instead. %ENV may not have been initialized correctly due to the fast handler and may thus carry wrong information or no information at all. If that didn't help, run your httpd with the -X option. This may make your bug appear either exactly once (the first time) or always but the first time. In this case, some variable is keeping it's value across requests. This often happens if you put some initialization code into <xsp:structure> sections of XSP pages - those are run exactly once, when the page is first loaded. Basically, check all your perl code and XSP pages for global variables (this includes top-level lexicals created with "my"). You should never store request data in global variables unless you make sure they are reinitialized on each request. No, this can't be used for storing values between requests. You need a session module for that (look on CPAN, there are at least two packages designed for AxKit). If that still didn't help, try disabling HTTP/1.1 keepalive. In Mozilla it's somewhere in the options, for other browsers find it out yourself. If that makes your problem goes away, you probably use some connection property ($r->connection->...). Those are retained during keepalive, so you must be prepared to deal with that. CommentsYou're welcome to add your own experiences of strange bugs. Edit This Page / Show Page History / |

Home