Re: More info on timeout problem

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

 



Hi Instruct ICC:

> >     I'm now wondering if some error is occurring that, for some reason,
is
> > silently ending the routine.  I'm building what may be a very long SQL
> > INSERT statement for each line in the CSV file that I'm reading; could
> > I be hitting some upper limit for the length of the SQL code?  I'd think
> > that an error would be presented in this case, but maybe I have to do
> > something explicitly to force all errors to display?  Even warnings?
> >
> >     Another thing I've noticed is that the "timeout" (I'm not even
certain
> > the problem IS a timeout any longer, hence the quotation marks) doesn't
> > happen at the same record every time.  That's why I thought it was a
> > timeout problem at first, and assumed that the varying load on the
server
> > would account for the different record numbers processed.  If I were
> > hitting some problem with the SQL statement, I'd expect it to stop at
> > the same record every time.  Or is that misguided thinking, too?
>
> 1) When you say, "doesn't happen at the same record every time" are you
> using the same dataset and speaking about the same line number?  Or are
> you using different datasets and noticing that the line number varies?  If
it's
> the same dataset, it sounds like "fun" -- as in "a pain in the assets".

    Yup, same dataset.  It took me forever to upload it, so I'm trying to
keep it there until I know it's been successfully loaded.  It's got about
30,000 records in it, and each one has 240 fields.

> 2) I'm writing something similar; letting a user upload a CSV file via a
> webpage, then creating an SQL query with many records.  So now I'll
> be watching your thread.  For debugging purposes, create your SQL
> statement and print it out on the webpage (or save it somewhere --
> maybe a file).  Don't have your webpage script execute the query.
> Then see if you get the complete query you expect.  Then copy that
> query into a database tool like phpmyadmin and see if you get errors
> when executing the query.

    Sounds much like what I'm trying to do.  I have had to give up, for the
time being, on using PHP to upload the datafile; it's about 56 MB in size
and nothing I do seems to let me upload anything larger than a 2MB file. :(

    How do I save the individual query statements to a file?  That may give
me a good option for checking a "log" of activity when the process fails
again.

    Thanks for your suggestions!

        Jon

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux