PDA

View Full Version : Attachment Download stops at 16,384 kbytes???


Abe Koenghiem
01-08-2010, 05:24 PM
When my users download a thread attachment, it downloads only the first 16, 384 kbytes.

It starts the download and when it gets to the 16M point, it declares the download "complete" and stops.

No errors.

Firefox or IE.

No difference "Save" option or "Open with"

Built a second vB 3.8.4 from a backup and it does the same thing.

define('DISABLE_HOOKS', true); does not change this behavior.

Server Type Linux
Web Server Apache v2.2.11
PHP 5.2.9
PHP Max Post Size 313.00 MB
PHP Maximum Upload Size 312.00 MB
PHP Memory Limit 314.00 MB
MySQL Version 5.0.84
MySQL Packet Size 313.00 MB

Attachments are flv and avi.

Has anyone seen this?

Lynne
01-08-2010, 05:40 PM
Take a look at these variables:
PHP Settings:
max_execution_time
memory_limit
post_max_size
upload_max_filesize
max_input_time

MySQL Settings:
max_allowed_packet
max_packet_size
wait_timeout

My guess is it is one of those that is effecting your download and you will have to change it in the appropriate conf file for either php or mysql. If you cannot do that, you should talk to your host about the issue.

Abe Koenghiem
01-08-2010, 06:10 PM
PHP Settings:
max_execution_time 30
memory_limit 314M
post_max_size 313M
upload_max_filesize 312M
max_input_time 60

MySQL Settings:
max_allowed_packet ( 313M in my.cnf) (328204288 according to 'show variable like max_allowed_packet'
max_packet_size Not set in my.cnf, not set in MySQL
wait_timeout Not set in my.cnf, net set in MySQL

I have been trying to understand why /etc/init.d/mysqld is not written to use all the settings in my.cnf ( like logfile statements ) but thats another thread.

I am going to bump my max_execution_time to 60 and see. Does that sound reasonable?

Thanks again for responding.

--------------- Added 1262982984 at 1262982984 ---------------

"I am going to bump my max_execution_time to 60 and see. Does that sound reasonable?"

No, thats not it. the file is still truncated at 16,384.

???

--------------- Added 1262983596 at 1262983596 ---------------

BTW,

When I did a query on the ****attachment table, the file sizes were correct so I am assuming that the files attached correctly ands the problem is in the download.

Thats assuming quite a bit. The behavior is consistant with an incomplete attachment ( with no error message) but a filesize field that shows what the file should be and not what it actually is.

--------------- Added 1262986629 at 1262986629 ---------------

I can successfully run this code on the affected machine.

<?php

header('Content-type: application/flv');

header('Content-Disposition: attachment; filename="MyFileName.flv"');

readfile('MyFileName.flv');
?>

I placed the flash file in the webroot with ftp.

Then I used this PHP page to download it. It downloaded completely and played without error.

Abe Koenghiem
04-06-2010, 01:26 PM
Is there any other setting beyond what I have listed above that might be causing this?

snakes1100
04-06-2010, 01:45 PM
What i would suggest is you tail your apache log w/ debug mode on in apache.

LogLevel debug

HUP apache

tail -f /path/to/apache/error_log | grep "youriphere"

try to dl a file and see if it spits out a error.

Abe Koenghiem
04-06-2010, 04:20 PM
Thanks, (but)

I changed warn to debug in apaches conf file.

I did a graceful restart of Apache

I downloaded and checked the log
I uploaded and then downloaded and checked again

Here are the last two entries

[Tue Apr 06 12:17:50 2010] [info] Server built: Dec 3 2009 11:16:31
[Tue Apr 06 12:17:50 2010] [debug] prefork.c(1013): AcceptMutex: sysvsem (default: sysvsem)

The Times are correct. In other words; nothing after restart.

During & after upload vBulletin showns the correct 60M size
During download it begins to download 60M and stops at a 16 and says finished.
No error.

Thanks for your help. Do you have any other ideas?

--------------- Added 1270578403 at 1270578403 ---------------

I found a workaround to my download limit by installing vbGallery

I can store the 60 Meg and up files in the Gallery and then reference them by a link from a thread.

My feeling is: this rules out PHP config and MySQL config issues.

Any thoughts on why vbGallery on the same LAMP server has no problem downloading over 16 Meg but the 3.8.5 vB install does?

Thanks everybody fro the advice, I learned a lot but I would still like to know what I missed.:)