We installed the software on our server to test it and it ran fine for several days without any issues. We did not do anything special inside and configured it etc. So the installation was pretty much vanilla. So no real changes has been made.
But now yesterday when I went back to start configure Invoice Ninja it is suddenly displaying the 500 error:
We have enabled debug mode [APP_DEBUG=true), but that doesn’t seem to do much of a help as the server only responds with 500 all the time. The only log file we can find is the laravel.log, but no specific error log or debug log etc.
We have given the installation 512 MB of memory so it should be sufficient. DB is MariaDB and apache web server.
File Permission changes:
env. 600, .htacess 404 (tested with 600 after the 500 error, no change)
When viewing the laravel.log file this one file seem to constantly be reported by invoiceNinja as a part of the issue:
/bootstrap/cache/routes-v7.php
At this point I don’t have any idea how to get rid of the 500 error and I would appreciate very much any help that would lead in the direction to be able to solve this.
Hmm it seems that our server is using Centos 6 so it is isn’t compatible with PHP 8 which just has been released. It is running PHP 7.4 right now which seems to be the highest compatible version.
Memory limit really can be variable depending on the size of your dataset, if you have thousands of records, i would recommend ~ 512mb more if you have 10’s of thousands of records.
In regards to PHP, if you are managing the server yourself, 7.3 should be fine… I think the issue you are seeing is related to SELINUX.
Hi @n03lm
thanks for sharing this. i did remove the two first ones at line 22092 - 22091 but nothing happened. Still 500. Next line 22089 contains ), removing that makes the server memory flooded and the server runs out of memory. closing the code line with ); with pretty much the same result.
Exception:
ParseError
in /home/public_htmlbootstrap/cache/routes-v7.php (line 22089)
‘waitSeconds’ => NULL, ), ),)); ),));
in /home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Application.php → Illuminate\Foundation\Support\Providers{closure} (line 955)
* @return void / protected function fireAppCallbacks(array $callbacks) { foreach ($callbacks as $callback) { $callback($this); } } /* * {@inheritdoc}
in /home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Application.php → fireAppCallbacks (line 900)
$this->bootProvider($p); }); $this->booted = true; $this->fireAppCallbacks($this->bootedCallbacks); } /** * Boot the given service provider. *
in /home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php → boot (line 17)
* @param \Illuminate\Contracts\Foundation\Application $app * @return void / public function bootstrap(Application $app) { $app->boot(); }}
in /home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Application.php → bootstrap (line 237)
$this->hasBeenBootstrapped = true; foreach ($bootstrappers as $bootstrapper) { $this[‘events’]->dispatch('bootstrapping: '.$bootstrapper, [$this]); $this->make($bootstrapper)->bootstrap($this); $this[‘events’]->dispatch('bootstrapped: '.$bootstrapper, [$this]); } }
in /home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php → bootstrapWith (line 152)
* @return void / public function bootstrap() { if (! $this->app->hasBeenBootstrapped()) { $this->app->bootstrapWith($this->bootstrappers()); } } / * Get the route dispatcher callback.
in /home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php → bootstrap (line 136)
{ $this->app->instance(‘request’, $request); Facade::clearResolvedInstance(‘request’); $this->bootstrap(); return (new Pipeline($this->app)) ->send($request) ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware) ->then($this->dispatchToRouter());
in /home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php → sendRequestThroughRouter (line 110)
public function handle($request) { try { $request->enableHttpMethodParameterOverride(); $response = $this->sendRequestThroughRouter($request); } catch (Throwable $e) { $this->reportException($e); $response = $this->renderException($request, $e); }
Kernel->handle(object(Request))
in /home/public_htmlpublic/index.php (line 57)
*/$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);$response = $kernel->handle( $request = Illuminate\Http\Request::capture());$response->send();
Stacktrace:
ParseError
ParseError:
syntax error, unexpected ')', expecting end of file
at /home/public_htmlbootstrap/cache/routes-v7.php:22089
at Illuminate\Foundation\Support\Providers\RouteServiceProvider->Illuminate\Foundation\Support\Providers\{closure}(object(Application))
(/home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Application.php:955)
at Illuminate\Foundation\Application->fireAppCallbacks(array(object(Closure), object(Closure), object(Closure)))
(/home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Application.php:900)
at Illuminate\Foundation\Application->boot()
(/home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(object(Application))
(/home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Application.php:237)
at Illuminate\Foundation\Application->bootstrapWith(array('Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables', 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders'))
(/home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:152)
at Illuminate\Foundation\Http\Kernel->bootstrap()
(/home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:136)
at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(object(Request))
(/home/public_htmlvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:110)
at Illuminate\Foundation\Http\Kernel->handle(object(Request))
(/home/public_htmlpublic/index.php:57)
I deleted the cache and ever restarted the server to make sure that the change was read.
Once I hit the enter key on my keyboard for the URL the browser just waits forever. Meanwhile on the server the script overflood the memory causing other websites and business applications to crash. Only option left is to restart the server again to get things up and running properly.
I did find the log is full of new error messages of another kind than the last time. I’ve uploaded it to Google Drive again: https://shorturl.gg/h3FCB3h