Very strange behavior during upload... Very strange behavior during upload...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Very strange behavior during upload...

Started by devar, August 28, 2008, 05:00:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

devar

Hi all,

I have a strange problem. I can´t post the URL because I have installed the CPG in a local intranet to upload photos that we use internally. I have a strange problem: the gallery work fine until now, but without change I start to detect a problem, some times during upload I receive a error of TEMPLATE ERROR that say: 'output_buffer' or 'file_line' in upload.php with 5 files uploading at the sime time. I check here and put the reduce the box of upload to 1 to check in detail. Now "sometimes" make the same error showing:

Template error
Failed to find block 'output_buffer'(#(<!-- BEGIN output_buffer -->)(.*?)(<!-- END output_buffer -->)#s) in :


        <tr>

                <td class="tableb" align="center">

                        <font size="3"><b>{MESSAGE}</b></font>

<!-- BEGIN file_line -->

                        <br />

                        <br />

                        {FILE_TXT}{FILE} - {LINE_TXT}{LINE}

<!-- END file_line -->



                        <br /><br />

                </td>

        </tr>


As we use big files ever in the intranet (files of 3800x2600 aprox and 5-6Mb each one), I think that are a problem of memory. I change the config of this to give more memory and more biggest files but not changes. The more strange of this that sometimes the same file upload fine and if try again perhpas upload fine again or perhaps not, yes, with the same file. Normally with small files don´t ocurr. In multiple files the problem normally appear when I choose the album to put the photo that are already upload. In individual files, because the album are already selected in the start, the problem appear after finish the upload in the db_input.php.

Any idea of what I can test, check, etc?

PHP 4.4.8
CPG 1.4.14
APACHE 2.2.9
MySQL 5.0.51

More data: because in first time I think that are a problem of memory I check the log and see:

"Wed Aug 27 10:46:04 2008 lfd: *User Processing* PID:812 Kill:1 User:relygall VM:102(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php"

After this I add more memory for the process but the problem continue...

Thanks in advance if can help me.  ;D

Nibbler

Do you get a better error message with debug mode enabled?

devar

I have enable the debug mode for administrator and only show this during error  :-\

Nibbler

Check the mysql error log. Maybe the connection to mysql is timing out during resizing of large files.

devar

 :-[ I can´t check the MySQL log, but I ask to the people that can check this and say me that are OK. The only strange behavior in the log are some process that the server kill automatically of more than 100Mb like this that I paste before:

"Wed Aug 27 10:46:04 2008 lfd: *User Processing* PID:812 Kill:1 User:relygall VM:102(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php"

I think that is any type of problem with the file size. Now I make some test and uploading multiple small files (approx 1Mb each one) don´t have problem, but if put only one of 5.4Mb the process some time finished fine, and other don´t finished and crash showing this error. Some times need manages of approx 5-6Mb.

I check after upload that I see the message: "1 uploads successful" (of a JPG of 5.55Mb) in the server folder ( /albums/edit ) and see correctly the file: "mHTTP_temp_53be4848.jpg" of this size. Now, I press CONTINUE, I select the album, put a title, description, etc, and again CONTINUE and again :'( CRASH!. (now I have set in this test multiple files batch, but I upload only one). The error again:

TEMPLATE ERROR ... "OUTPUT_BUFFER"... etc, the same, but the only change that is in upload.php, I think that is perhap because this the batch process and keep in upload.php and not in db_input.php like in single upload.

Any idea? THANKS!!!.

Joachim Müller

Do exactly as suggested in the upload troubleshooting section of the docs...

devar

One more detail:

I check again in the folder /albums/edit/ and after the error I found a new file: "preview_aedde89d.jpg" I open this file and is the correct small thumbnail of the photo that I try upload (without damage, etc). This mean that the resize are finished OK and sure the problem are after this.

I don´t know if this help in any, but I report all the details that I can.

devar

Quote from: Joachim Müller on August 29, 2008, 12:21:37 AM
Do exactly as suggested in the upload troubleshooting section of the docs...
I already check. Also some weeks back work perfect from various months until now (I dont make any change) and now we detect this trying upload new pictures the last week :(. Also I re-read now the DOC in the case that I forget any. Thanks again.

Nibbler

Ask them what the setting 'wait_timeout' is set to for MySQL.

devar

He say me this:

"wait_timeout of server is set to 30"

Also if this 30 mean 30 seconds the error ever aprox aprox 10-12 seconds after press in continue to insert into the album.
Any idea?

One other detail that I detect:
The local internal path in the moment of installation are:

/home/rely/public_html/cpg/

By a problem with need change somes and now are:

/backup/home2/rely/public_html/cpg/

but are symlinked to the old /home.
Can be possible that this cause any internal problem in this moment?

The external path continue as ever http://internalIP/cpg/

Thanks in advance by all support.

Nibbler

If you get the error before 30 seconds then that can't be the problem. You could try switching from GD2 to ImageMagick and see if that helps. I don't know what else to suggest otherwise.

devar

OK, thanks! I try.

The paths that I show before can cause any problem?

devar

Hi again, I continue checking this problem and I think that the script use too much memory by any reason. By example, to upload two files of aprox 5.5-6Mb use more than 100Mb and the process are killed by the server, please check:

Mon Sep 29 12:15:45 2008 lfd: *User Processing* PID:546 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 12:20:20 2008 lfd: *User Processing* PID:3244 Kill:1 User:relygall VM:102(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 16:08:47 2008 lfd: *User Processing* PID:6167 Kill:1 User:relygall VM:68(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/showthumb.php

Mon Sep 29 16:08:47 2008 lfd: *User Processing* PID:6165 Kill:1 User:relygall VM:100(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/showthumb.php

Mon Sep 29 16:08:47 2008 lfd: *User Processing* PID:6161 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/showthumb.php

Mon Sep 29 16:08:47 2008 lfd: *User Processing* PID:6166 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/showthumb.php

Mon Sep 29 16:08:47 2008 lfd: *User Processing* PID:6163 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/showthumb.php

Mon Sep 29 16:09:22 2008 lfd: *User Processing* PID:6409 Kill:1 User:relygall VM:100(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/addpic.php

Mon Sep 29 16:09:22 2008 lfd: *User Processing* PID:6408 Kill:1 User:relygall VM:100(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/addpic.php

Mon Sep 29 16:09:22 2008 lfd: *User Processing* PID:6407 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/addpic.php

Mon Sep 29 16:09:22 2008 lfd: *User Processing* PID:6413 Kill:1 User:relygall VM:69(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/addpic.php

Mon Sep 29 16:09:22 2008 lfd: *User Processing* PID:6410 Kill:1 User:relygall VM:99(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/addpic.php

Mon Sep 29 16:10:14 2008 lfd: *User Processing* PID:6943 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/addpic.php

Mon Sep 29 16:25:58 2008 lfd: *User Processing* PID:17493 Kill:1 User:relygall VM:111(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 16:26:38 2008 lfd: *User Processing* PID:17916 Kill:1 User:relygall VM:108(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 16:27:27 2008 lfd: *User Processing* PID:18579 Kill:1 User:relygall VM:102(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 16:34:18 2008 lfd: *User Processing* PID:23215 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 17:28:26 2008 lfd: *User Processing* PID:19874 Kill:1 User:relygall VM:102(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 17:41:26 2008 lfd: *User Processing* PID:26808 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 17:42:35 2008 lfd: *User Processing* PID:27455 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php

Mon Sep 29 20:06:04 2008 lfd: *User Processing* PID:29929 Kill:1 User:relygall VM:101(MB) EXE:/usr/php4/bin/php CMD:/usr/php4/bin/php /home/rely/public_html/cpg/upload.php


Any idea? THANKS!

devar

One more detail: normally these images are approx of 2600x3900 px.

Nibbler

Resize them before you upload. Large images take a lot of memory to process.

devar

Thanks Nibbler!, not other solution to can use as big as have? Internally we need the JPG as original for sharing for different uses as high quality.
You know any solution in configuration at server or in the coopermine, etc? THANKS AGAIN.

Nibbler


devar

Not... I try and report results later. THANKS AGAIN.