RE: Queries probably timing out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I set set_time_limit (10*60); high up.

Error message:
"Lost connection to MySQL server during query"

Query is:
$query="CREATE TABLE IF NOT EXISTS $tbl1
SELECT TestData1.Year,
TestData1.Period,TestData1.Co,TestData1.Acct,TestData1.Dept,TestData1.Descri
ption,TestData1.Net,TestData1.Net*.175 AS Exps175, TestData2.USD FROM
TestData1 INNER JOIN TestData2 ON
CONCAT(TestData1.Journal,TestData1.Description)=CONCAT(TestData2.journal,Tes
tData2.description) WHERE TestData1.Dept<>'D1'";

Thanks,
John

-----Original Message-----
From: Micah Stevens [mailto:micah@raincross-tech.com]
Sent: 19 August 2003 18:00
To: PHP-DB List
Subject: Re:  Queries probably timing out



What leads you to believe that it's a query timeout? Is the php script
timing 
out waiting for the database? Do you get an error saying something about
"Max 
Execution Time"?

If so, you may want to set that higher in your script. Go check out: 
http://si.php.net/manual/en/function.set-time-limit.php

That's not a small database, but it unless you're query has some CRAZY join 
action in it, it should pre fairly speedy.  I've never seen MySQL time out 
though.  Even with some stupidly slow queries I've done in the past. So I'm 
guessing it's PHP.

If you get an error, post it on the list.
-Micah


On Tuesday 19 August 2003 2:59 am, Ignatius Reilly wrote:
> ________________________
> ----- Original Message -----
> From: "Dillon, John" <JDillon@cantor.co.uk>
> To: "PHP-DB List" <php-db@lists.php.net>
> Sent: Tuesday, August 19, 2003 11:47 AM
> Subject:  Queries probably timing out
>
>
> I'm doing queries on tables with 45,000 rows in one table and 1-2000 rows
> in another..  I think the queries are failing due to timeout on the
server.
> The server is not dedicated to me and I may not be able to affect the
> timeout settings...though I'll ask my hosting company (Positive Internet).
> If I decide to do the queries on my local PC (I don't need or want to do
> them over the internet),
>
> (1) do I have to set up my PC as a server,
>
> Yes.
>
> (2) if so what's the quickest and easiest server to get started with,
>
> Install Apache, PHP and MySQL. There are countless tutes on the web on how
> to do so. It is a breeze under Windows 2000
>
> (3) are there complications running the server on the same PC as the
client
> applications (ie my PHP code),
>
> No, except maybe performance
>
> (4) do I then download MySQL and PHP onto it, though I read PHP comes
> bundled with MySQL,
>
> PHP has an API to MySQL, but you have to have first a MySQL server running
>
> (5) will it become clear to me what host name/IP address to use to connect
> to the database (up to now I've been told by the hosting company).
>
> You can use a dynamic DNS set-up (look for instance www.dnsmadeeasy.com)
if
> you need a name-based address. Also a breeze to set up.
>
> Any other suggestions on timeouts on queries?
>
> Thanks,
>
> John
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> http://www.cantor.com
> CONFIDENTIAL: This e-mail, including its contents and attachments, if any,
> are confidential. If you are not the named recipient please notify the
> sender and immediately delete it. You may not disseminate, distribute, or
> forward this e-mail message or disclose its contents to anybody else.
> Copyright and any other intellectual property rights in its contents are
> the sole property of Cantor Fitzgerald.
>      E-mail transmission cannot be guaranteed to be secure or error-free.
> The sender therefore does not accept liability for any errors or omissions
> in the contents of this message which arise as a result of e-mail
> transmission.  If verification is required please request a hard-copy
> version.
>      Although we routinely screen for viruses, addressees should check
this
> e-mail and any attachments for viruses. We make no representation or
> warranty as to the absence of viruses in this e-mail or any attachments.
> Please note that to ensure regulatory compliance and for the protection of
> our customers and business, we may monitor and read e-mails sent to and
> from our server(s).
>
> For further important information, please read the  Important Legal
> Information and Legal Statement at
> http://www.cantor.com/legal_information.html
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux