ftbastler / BoNeMEAL

The web app for the Ban-Management Bukkit plugin by confuser. Work in progress // Currently maintained by @oranges13
https://ftbastler.github.com/BoNeMEAL
Other
12 stars 8 forks source link

Admin page loading really slow or failing to load #40

Closed thu2468 closed 8 years ago

thu2468 commented 9 years ago

This is the error [2015-06-15 03:46:00] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 12353016 bytes)' in /home/www/html/bans/application/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:99 Stack trace:

0 {main}

[2015-06-15 03:47:10] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 12353016 bytes)' in /home/www/html/bans/application/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:99 Stack trace:

0 {main}

[2015-06-15 03:51:07] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 12353016 bytes)' in /home/www/html/bans/application/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:99 Stack trace:

0 {main}

[2015-06-15 16:50:13] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 12378661 bytes)' in /home/www/html/bans/application/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:99 Stack trace:

0 {main}

ftbastler commented 9 years ago

Go to the index.php file and add ini_set('memory_limit', '1024M'); or similar to increase your PHP memory limit. Alternatively, you can also use a php.ini file and set that value.

EvilOlaf commented 9 years ago

Maybe a stupid question, but isn't 1GB quite a hugh amount of memory for a php script?

ftbastler commented 9 years ago

Yeah, you will not need that much... :stuck_out_tongue_winking_eye:

thu2468 commented 9 years ago

So Like this?

<?php
/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylorotwell@gmail.com>
 */

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
|
*/

require __DIR__.'/application/bootstrap/autoload.php';

ini_set('memory_limit', '1024M');

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/application/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make('Illuminate\Contracts\Http\Kernel');

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);
thu2468 commented 9 years ago

Like i can log in but when i try to go into admin panel it times out and say that error

ftbastler commented 9 years ago

Yes, that should do it.

thu2468 commented 9 years ago

Hmm sometime it loads sometime it doesnt load the admin panel. Like sometime there will be a long load then it will connect and then sometime its a long load then crash

ftbastler commented 9 years ago

How many servers did you add to BoNeMEAL?

thu2468 commented 9 years ago

Just 2

ftbastler commented 9 years ago

What are your server specs? They might be a bit low...

thu2468 commented 9 years ago

This is the server spec http://www.ovh.com/ca/en/dedicated-servers/enterprise/2014-SP-64.xml

ftbastler commented 9 years ago

Well, that should be plenty of specs... I might add some measuring so we can find out what's taking so long to load the page.

thu2468 commented 9 years ago

Hm can you create a account on your thing and i can set you to a moderator This way you can see what is going on. And test if you also have a long load Also you can hit me up on skype: thu2468

thu2468 commented 9 years ago

Ok i have set you to moderator. Do you have any issue on connecting to the admin panel dashboard?

thu2468 commented 9 years ago

Have you figured out what is wrong yet?

ftbastler commented 9 years ago

No, sorry - not yet. Could you maybe go into your .env file and set APP_DEBUG=true?

thu2468 commented 9 years ago

Ok i have added the option in application/.env

thu2468 commented 9 years ago

Foudn anything yet?

ftbastler commented 9 years ago

It might be because of your large number of database entries. What happens when you remove one server? Does it load faster?

thu2468 commented 9 years ago

It loaded with one server, but it still pretty long load. But didnt throw error

thu2468 commented 9 years ago

It was loading faster before a couple of updates before the latest one. could it be possible that the statistic in the dashboard causing the slow load. as it is getting data from every players every time.

thu2468 commented 9 years ago

But is there a fix for this as it shouldnt load this long even when having one server

thu2468 commented 9 years ago

So have you found a fix yet?

thu2468 commented 9 years ago

like it seems to only happen in p-x.ca/bans/admin because i can go to http://p-x.ca/bans/admin/users just fine and loads fast

Torbikini commented 8 years ago

I've been having this issue too. I can directly visit https://bans.simplecraft.us/admin/users but if I try https://bans.simplecraft.us/admin it just says "Whoops, looks like something went wrong". However this notification is instant compared to your situation.

ftbastler commented 8 years ago

Can you post the laravel log file and your webserver log error message?