503 error on include large file

#1
Hello. I need to include big (20Mb) PHP-file with two-dimensional array (about 80k rows) into my PHP-script. This causes 503 server error on LSWS. I tried to enlarge PHP memory limit to 1024Mb, but it doesn't help. It's a specific problem, because on Apache server file is included without any error.
 
#3
Here is my settings:


My engine.php:
PHP:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

include('data.php'); // <- it's about 20Mb
And my error log:
Code:
2023-09-01 10:40:44.508249 [NOTICE] [10704] [111.22.33.44:99099#example.com] oops! 503 Service Unavailable
2023-09-01 10:40:44.508308 [INFO] [10704] [111.22.33.44:99099] Content len: 0, request line: 'GET / HTTP/1.1'
2023-09-01 10:40:44.508312 [INFO] [10704] [111.22.33.44:99099] Redirect: #1, URL: /engine.php
 
Last edited:
#5
Is the source of the included file an external source from other host?
data.php is local file:
PHP:
<?php
$data = array();
$data[] = array(
    'a' => 'string',
    'b' => 'string',
    'c' => 'url',
    'd' => 'string'
);
$data[] = array(
    'a' => 'string',
    'b' => 'string',
    'c' => 'url',
    'd' => 'string'
);
...
520000 rows of code total
 

serpent_driver

Well-Known Member
#6
503 Service Unavailable can have many causes. The first thing I would suspect is that the load is too high.
If the file is included, what happens afterwards?
 
#7
I need to operate this data, but I've realized what only two files enough to reproduce the problem. Engine.php consists only one include of data.php and no other code. And this generates an error. When I tried to remove some rows from data.php - only 400k left, 16Mb file - error dissappeared.
 
#11
I've splitted data.php into 2 parts 10Mb each and it worked.
But data.php is generated by another script

Are there any settings inside LSWS to proccess big php-files?
 

serpent_driver

Well-Known Member
#12
Top