Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


OpenLiteSpeed large downloads stall/hang
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

OpenLiteSpeed large downloads stall/hang

Hope everyone is having a great day. I've been playing with OpenLiteSpeed setup with HTTP/HTTPS and the lsphp5 (their built in PHP5). It works great for sites but when I installed ownCloud it seems to be having an issue with files that are large enough for it to take a little time to download (ie 100mb+). It seems the issue is only when a large file is being sent through php because the same file downloads 100x without issues/stalling if it's a direct link to it (ie www.site.com/100mb.test) Below is an example of what the stall looks like.

I tried to do my own debugging and figure this out on my own (to not bother the community) but I can't seem to find the issue. I have ruled out the following:

-- It's not ownCloud because the same issue happens with pydio (another self hosted cloud file manager)
-- Owncloud & pydio both works without fault serving large files with apache & nginx
-- It's not OpenLiteSpeed because the exact same file stalling through php can be downloaded directly from the web server without fault
-- I believe it is an issue with the built in PHP that OpenLiteSpeed is using/incorporated but I can't seem to find any errors throughout the logs directly related to this issue; even watching tail -f log it will not show any error happening from the stalled download.

I have the same setup installed on Debian 7 64bit, Centos 6 64bit. I've used fresh compiled installations with compiled/build of PHP5.6 & also the RPM Repo Centos 6 (everything precompiled so I know it was installed properly). The openlitespeed.com website/forum isn't sending new registered user confirmations; therefore I came to the wonderful LET community for support.

I greatly appreciate any help. I can be found on IRC if anyone would like to take some time to help me out, just shoot me over a PM.

Comments

  • Is it timing out the connection? What does something like curl/wget with verbose logging show as the reason? Is the connection terminating or just stalling?

  • doughnetdoughnet Member
    edited October 2014

    From what I can see the connect is not timing out or any information is provided in the logs of such. It doesn't terminate it just hangs until the client cancels the download request.

    Since my test is going through owncloud (for a php sendfile) I don't really know how to do this & I been trying to figure out how to do it through lynx but can't get past the login screen.

    BTW, thanks for getting back to me.

  • What about doing a straight static download to confirm its working, just make a testfile and download it from the web-server

  • sorry, yes i have done that multiple times. 100x to be exactly to confirm from IE/Firefox/Chrome/wget. They all work when doing a direct download of the raw data. That's why I ruled out it being a OpenLiteSpeed webserver issue (the server itself) & makes me think it's directly related to PHP (OpenLiteSpeed uses PHP LSAPI http://www.litespeedtech.com/products/litespeed-sapi/php)

  • Try the wget of the php file locally to confirm whether its a timeout issue. I am assuming the file will come down fast enough to avoid the connection timeout/SAPI timeout

  • With ownCloud I can't just do a wget of the file or curl (not sure how to do it).

  • Can you not make a file available for public download via it?

  • MicrolinuxMicrolinux Member
    edited October 2014

    Do you have any firewall rules configured?

    You could also try rebuilding a different version of PHP, they make it a pretty straight-forward process.

  • @Microlinux said:
    Do you have any firewall rules configured?

    You could also try rebuilding a different version of PHP, they make it a pretty straight-forward process.

    Thanks for the comments. I have tried rebuilding PHP. I know it's pretty straight forward and thought everything was going perfect, but ... then I tried a large download and it kept stalling/freezing. I tried 5.6.x 5.5.x & 5.4.x with the same build options. My build options are as follows:

    --with-mcrypt --with-mhash --with-zlib --with-gettext --enable-exif --enable-zip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --with-mysql-sock --with-curl --with-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype-dir=lib64 --with-jpeg-dir=lib64 --with-png-dir=lib64 --with-xpm-dir=lib64 --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-kerberos --enable-posix --enable-xml --with-config-file-scan-dir=/openlitespeed/php.d --with-litespeed --with-iconv

    It compiles perfectly fine without any errors on all versions.

  • NyrNyr Community Contributor, Veteran

    This is a problem with ownCloud itself, I experienced the same in the past.

  • I thought the same but then I tried pydio (www.pyd.io) and it had the same issue! I was shocked and was hoping (to ease my brain from figuring this out) it was owncloud itself.

  • Just to keep everyone up to date (if anyone cares), I tried installing the standard/free edition of LiteSpeed using the same PHP5.6 compiled options, same installation and configuration of ownCloud. This time it works without a flaw. Doing to do about 100x more download tests to reconfirm, but thus far it seems that there is an issue with the OpenLiteSpeed webserver & large file sizes. Hopefully I get my e-mail confirmation for their forum board so I can start probing questions directly to LiteSpeed.

  • GIANT_CRABGIANT_CRAB Member
    edited October 2014

    PHP scripts have timeouts. see http://php.net/manual/en/function.set-time-limit.php and http://php.net/manual/en/info.configuration.php#ini.max-execution-time

    Edit: Although it might seem not to be possibly this issue, its better not to rule it out without checking it

  • NyrNyr Community Contributor, Veteran
    edited October 2014

    At least in my case, it wasn't a timeout. The script did crash the entire PHP-CGI worker.

    Thanked by 1GIANT_CRAB
  • Nyr said: The script did crash the entire PHP-CGI worker.

    lol

Sign In or Register to comment.