Page 1 of 1

MOST RESOLVED The server closed the connection

PostPosted: 13. December 2013 23:02
by IamJim
Getting this error, and not sure how to resolve please?

File is .csv and 8meg

The server closed the connection without sending any data.

This wrror was using CHROME

This is Firefox:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in E:\xampp\phpMyAdmin\libraries\import.lib.php on line 511

1) 1.8.0 XAMPP new install Windows 2003 Server R2

2) php.ini had 2 meg upload core set and gave me error.

3) I know have the following:

upload_max_filesize = 32M
memory_limit = 128M
post_max_size = 48M

max_execution_time = 300 /* was 30 */
max_input_time = 600 /* was 60 */

*****************

Lines 507 - 527
Code: Select all
    /**
     * If the cell is NULL, don't treat it as a varchar
     */
    if (! strcmp('NULL', $cell)) {
        return $last_cumulative_size;
    }
    /**
     * What to do if the current cell is of type VARCHAR
     */
    elseif ($curr_type == VARCHAR) {
        /**
         * The last cumulative type was VARCHAR
         */
        if ($last_cumulative_type == VARCHAR) {
            if ($curr_size >= $last_cumulative_size) {
                return $curr_size;
            } else {
                return $last_cumulative_size;
            }
        }

Re: The server closed the connection without sending any dat

PostPosted: 13. December 2013 23:08
by Altrea
IamJim wrote:Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in E:\xampp\phpMyAdmin\libraries\import.lib.php on line 511

Your script already captured the allowed 128Mb RAM and cannot allocate more.
Increase the memory limit.

Re: The server closed the connection without sending any dat

PostPosted: 13. December 2013 23:17
by IamJim
Thank you for reply !!

477/478/479 =
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M

Changing to 256 for test and restart http/mysql

No other settings need changing?

Re: The server closed the connection without sending any dat

PostPosted: 13. December 2013 23:23
by Altrea
I don't know!?
Test it out and report back what you get.

Re: The server closed the connection without sending any dat

PostPosted: 13. December 2013 23:27
by IamJim
Error

MySQL said: Documentation
#2006 - MySQL server has gone away

Re: The server closed the connection without sending any dat

PostPosted: 13. December 2013 23:47
by IamJim
OK, sorry for delay...rebooted and now 4 times =

Apache HTTP Server encountered a problem and needed to close.

Something is/got trashed

szAppName : httpd.exe szAppVer : 2.4.2.0 szModName : php5ts.dll
szModVer : 5.4.4.0 offset : 0026ea41

C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WERed36.dir00\httpd.exe.mdmp
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WERed36.dir00\appcompat.txt

Re: The server closed the connection without sending any dat

PostPosted: 13. December 2013 23:58
by Altrea
Then you should maybe undo your changes.
Don't know what you have done wrong there.

Re: The server closed the connection without sending any dat

PostPosted: 14. December 2013 00:03
by IamJim
?? Undo my changes?

Original limits as we know are set in your xampp php.ini file upload is 2meg..correct?

After reboot, and xampp fired...tried again
And again:
Error
MySQL said: Documentation
#2006 - MySQL server has gone away

I have located this and will try: {after dinner} and report back.

Thanks again!!

http://stackoverflow.com/questions/7942 ... -gone-away

Note that this can be set on your server as it's running. Use: "set global max_allowed_packet=104857600". NOTE: My value sets it to 100MB. – rickumali Mar 27 '12 at 17:03


This was the solution to my 'mysql server has gone away' errors that I KNEW weren't actually timeouts. – Keeyai Oct 2 '12 at 23:31
1

For xampp users, the my.cnf can be found at: C:\xampp\mysql\bin\ – Valentin Despa Nov 8 '12 at 11:38


Note that for Mac users, mysql looks for your my.cnf file first at /etc/my.cnf, then /etc/mysql/my.cnf. In my case on Mountain Lion there was no file there, I copied one from /usr/local/mysql/support-files. – NickWoodhams Feb 5 at 10:17


solved my 2006 error which was caused by a mysql insert of a blob that was a binary file of about 16MB in size. THANKS George! – panofish Aug 9 at 15:34

Re: The server closed the connection without sending any dat

PostPosted: 14. December 2013 00:18
by IamJim
No such file..

Found: my.ini

set max_allowed_packet = 16M

was 1m

Will reboot all and try again.

Re: The server closed the connection without sending any dat

PostPosted: 14. December 2013 00:44
by IamJim
Well, rebooted and httpd.exe pegged processor for a long time, finally settled down. CAn go to Localhost, but now unable to access phpMyAdmin.

Re: The server closed the connection without sending any dat

PostPosted: 14. December 2013 01:41
by IamJim
Had to go back to 1M then ok, then 4M OK, then 8M and I can still operate phpMyAdmin..

So now? I get Fatal error: Maximum execution time of 300 seconds exceeded in E:\xampp\phpMyAdmin\libraries\dbi\mysql.dbi.lib.php on line 170

I will try php.ini

3000 + 6000

WAS BELOW
max_execution_time = 300 /* was 30 */
max_input_time = 600 /* was 60 */