DBD::mysql::st execute failed: Out of memory

DBD::mysql::st execute failed: Out of memory

am 16.03.2006 23:30:52 von Dustin Tenney

------=_Part_7835_551805.1142548252912
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

So I have a query joining two large tables - about 4 million rows each that
is throwing this error. The query will work fine from the mysql cli, but
when being called from perl I get this:

DBD::mysql::st execute failed: Out of memory (Needed 56657250 bytes) at
../find.pl line 22.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at ./find.p=
l
line 23.


A restart of mysql fixes the problem for a week or so. The error log for
mysql also shows an error of:

[ERROR] /mysql/libexec/mysqld: Sort aborted


So it would appear to be running out of sort space. The machine has 4G of
ram and mysql is only using about 3G. I have adjusted the sort buffers way
up and it has not helped. When it fails it always complains that it needs
around the exact same amount (54M). The perl script was on a different
machine with virtually 4G to its disposal.

I asked on the forums and got no replies. Any help would be appreciated.
Thank you.

------=_Part_7835_551805.1142548252912--

Re: DBD::mysql::st execute failed: Out of memory

am 17.03.2006 16:15:44 von Boysenberry Payne

I'm not sure how to help you with this. If you don't get a reply
that's satisfactory
try modperl@perl.apache.org



Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Mar 16, 2006, at 4:30 PM, Dustin Tenney wrote:

> So I have a query joining two large tables - about 4 million rows each
> that
> is throwing this error. The query will work fine from the mysql cli,
> but
> when being called from perl I get this:
>
> DBD::mysql::st execute failed: Out of memory (Needed 56657250 bytes) at
> ./find.pl line 22.
> DBD::mysql::st fetchrow_array failed: fetch() without execute() at
> ./find.pl
> line 23.
>
>
> A restart of mysql fixes the problem for a week or so. The error log
> for
> mysql also shows an error of:
>
> [ERROR] /mysql/libexec/mysqld: Sort aborted
>
>
> So it would appear to be running out of sort space. The machine has
> 4G of
> ram and mysql is only using about 3G. I have adjusted the sort
> buffers way
> up and it has not helped. When it fails it always complains that it
> needs
> around the exact same amount (54M). The perl script was on a different
> machine with virtually 4G to its disposal.
>
> I asked on the forums and got no replies. Any help would be
> appreciated.
> Thank you.


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql::st execute failed: Out of memory

am 17.03.2006 16:28:40 von Dave Howorth

Boysenberry Payne wrote:
> I'm not sure how to help you with this. If you don't get a reply that's
> satisfactory
> try modperl@perl.apache.org

> On Mar 16, 2006, at 4:30 PM, Dustin Tenney wrote:
> ...
>> I asked on the forums and got no replies. Any help would be appreciated.
>> Thank you.

Perhaps you would get more replies if you showed some details? Such as
the Perl code or the SQL query or the versions of Mysql and DBI etc.

Dave

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql::st execute failed: Out of memory

am 17.03.2006 17:50:05 von Dustin Tenney

------=_Part_7912_33106879.1142614205914
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I am looking at using "mysql_use_result", but the result returned can be a
single row and will still get this error.

Software versions:

DBD-mysql-3.0002
DBI-1.50
MySQL 5.0.17

The query is coming from a CMS(webgui). The query is ugly and the table
design is even worse for the amount of data that we have in it. Here is an
example of the query that fails:

$query =3D "select users.userId, users.username, users.status,
users.dateCreated, users.lastUpdated, email.fieldData as email from users
left join userProfileData email on users.userId=3Demail.userId and
email.fieldName=3D'email' where status like '%' and (users.username like
'dtenney%' or email.fieldData like 'dtenney%') and users.userId not in
('0') order by users.username";





On 3/17/06, Dave Howorth wrote:
>
> Boysenberry Payne wrote:
> > I'm not sure how to help you with this. If you don't get a reply that'=
s
> > satisfactory
> > try modperl@perl.apache.org
>
> > On Mar 16, 2006, at 4:30 PM, Dustin Tenney wrote:
> > ...
> >> I asked on the forums and got no replies. Any help would be
> appreciated.
> >> Thank you.
>
> Perhaps you would get more replies if you showed some details? Such as
> the Perl code or the SQL query or the versions of Mysql and DBI etc.
>
> Dave
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=3Dtenney@gmail.com
>
>

------=_Part_7912_33106879.1142614205914--