Thread: Problem: message type 0xxx arrived from server while idle

Problem: message type 0xxx arrived from server while idle

From
Keatis
Date:
Hello, i've encountered such problem:

i'm using PostgreSQL 7.4 (though problem applies to 8.0 too) on FreeBSD 5.2.1 with Apache 1.3.31 (DBI 1.43 and DBD-Pg
1.32).

I have, lets say Module.pm with such function:
sub get_users{
 my @res;
 #$dbh is defined in other module, but is visible and valid here.
 my $sth = $dbh->prepare("SELECT * FROM users where nick like '...' and passwd like '...'");
 $sth->execute;
 while(my $href = $sth->fetchrow_hashref){
  push @res, $href;
 }
return \@res;
}

And I have some script, which dynamically outputs web-page content and have get_user function call.

If i update that page in browser too fast, then web server seems to hang up.
And it looks much like a problem with postgresql happened. In my apache's log i can see

message type 0x54 arrived from server while idle
message type 0x44 arrived from server while idle
message type 0x43 arrived from server while idle
message type 0x5a arrived from server while idle

Message "message type 0x44 ..." could repeat for 2-20 times.

The same could be archieved if i will put in my script two sequent calls of get_user function, e.g.

print "Content-Type: text/html\n\n";

print <some_html_stuff>;
get_user();
get_user();
print <some_html_stuff>;

Actually i don't know, but i think this can also happen when two or more users request this page simultaneously.

What are those error messages and what do they mean?
How can i get rid of them?
Once this problem occurs, the rest of the website stops working... (though restarting apache can help, but it is not a
solution).


Setting
log_statement=yes;
log_error_verbosity = verbose;
and other log_* vars to debug5
in postresql.conf didn't gave any comprehensive answer in pgsql's log file.

All sql statements executed - are 100% correct and have been tested many times.

Thanks in advance for any idea...


Re: Problem: message type 0xxx arrived from server while idle

From
Michael Fuhr
Date:
On Fri, Apr 29, 2005 at 12:52:21AM +0400, Keatis wrote:
>
> i'm using PostgreSQL 7.4 (though problem applies to 8.0 too) on
> FreeBSD 5.2.1 with Apache 1.3.31 (DBI 1.43 and DBD-Pg 1.32).

Is the code running under mod_perl?  If so, what versions of Perl
and mod_perl?

> And I have some script, which dynamically outputs web-page content
> and have get_user function call.
>
> If i update that page in browser too fast, then web server seems to hang up.

What do you mean by "update too fast"?  What exactly are you doing?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: Problem: message type 0xxx arrived from server while idle

From
"Keatis"
Date:
"Michael Fuhr" <mike@fuhr.org> wrote:
news:20050429150857.GA82676@winnie.fuhr.org...
>>
>> i'm using PostgreSQL 7.4 (though problem applies to 8.0 too) on
>> FreeBSD 5.2.1 with Apache 1.3.31 (DBI 1.43 and DBD-Pg 1.32).
>
> Is the code running under mod_perl?  If so, what versions of Perl
> and mod_perl?

Perl 5.8.5
mod_perl 1.29
HTML::Mason 1.28

>> And I have some script, which dynamically outputs web-page content
>> and have get_user function call.
>>
>> If i update that page in browser too fast, then web server seems to hang
>> up.
>
> What do you mean by "update too fast"?  What exactly are you doing?

When page is loaded in browser, press F5 and you'll get webpage updated
(resend new request to webserver and get an answer, i think you understand
this).
The problem arises when i press F5 rapidly, 2-3 times in second (so,
generating the same number of requests to apache).
In other words, making some get_user function calls in short period of time,
'cause two sequent calls of the same function in script lead to the same
problem...