ToxicRevolution / CSGORankMeWeb

Web interface for Rank Me CSGO Stat tracking plugin
https://Toxicrevolution.net
MIT License
30 stars 10 forks source link

Memory size - v2 #14

Closed szogi1910 closed 7 years ago

szogi1910 commented 7 years ago

The problem reappeared - https://github.com/ToxicRevolution/CSGORankMeWeb/issues/13 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3 bytes) in /home/pggames/domains/project-games.eu/public_html/statystyki/dd2mirage/control/queryFunctions.php on line 47

kennyLtv commented 7 years ago

Looking into this now.

kennyLtv commented 7 years ago

So this is going to be clunky and slow but it should fix it till we can get a more permanent solution out. If you go to js/leaderboard/leaderboardFunctions.js and change on line 5 the URL for the ajax from leaderboardGrab.php to leaderboardGrabLarge.php I believe it will work temporarily. I am running that leaderboardGrab on a little over 17k entries on my test server. Please let me know if that doesn't fix it for now.

szogi1910 commented 7 years ago

Unfortunately, it didn't work for me

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 79 bytes) in /home/pggames/domains/project-games.eu/public_html/statystyki/dd2mirage/control/queryFunctions.php on line 47

APet74 commented 7 years ago

I have a new permanent solution almost ready for deployment.

On Sep 2, 2017 4:07 PM, "szogi1910" notifications@github.com wrote:

The problem reappeared - #13 https://github.com/ToxicRevolution/CSGORankMeWeb/issues/13 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /home/pggames/domains/project-games.eu/public_html/ statystyki/dd2/control/queryFunctions.php on line 47

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ToxicRevolution/CSGORankMeWeb/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgumSrXbp72Z3FqGro97Su4DFf2Y5FPks5secOhgaJpZM4PLAvh .

APet74 commented 7 years ago

Szogi, go download the latest release. I made a change to the leaderBoardGrab.php so that it uses server sided data tables. You will want to rerun the install.php in the /install/ directory as it adds some new information to the config.php which is required. Let me know if you have problems. As always, download the new files, and replace all current files you have.

Thanks.

szogi1910 commented 7 years ago

After uploading the new version of leaderboards.php returns us communique No data available in table

I suspect the error is in $ sql_details = array where I can not define the name of the table from which to retrieve server data

APet74 commented 7 years ago

Table name should be pulled from the variable named $table in the config.php.

On Tue, Sep 5, 2017 at 8:29 AM, szogi1910 notifications@github.com wrote:

After uploading the new version of leaderboards.php returns us communique No data available in table

I suspect the error is in $ sql_details = array where I can not define the name of the table from which to retrieve server data

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ToxicRevolution/CSGORankMeWeb/issues/14#issuecomment-327175229, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgumXfRBHUnNolOhynFw_-dxubJqfEzks5sfUyogaJpZM4PLAvh .

szogi1910 commented 7 years ago

The data in the table was correctly downloaded before the update. code below, which as you can see has data to connect to the database but when we have several tables it is probably unable to retrieve data using which leaderboards.php displays no data available in table

$sql_details = array(
            'user' => 'xxx_user',
            'pass' => 'xxx',
            'db' => 'xxx_rankme',
            'host' => 'localhost'
);

Yes I shoot maybe it should be

$sql_details = array(
            'user' => 'xxx_user',
            'pass' => 'xxx',
                        'table' => 'xxx',
            'db' => 'xxx_rankme',
            'host' => 'localhost'
);
APet74 commented 7 years ago

Just pulled a fresh copy of the repo and it's giving an error. Let me address it real quick.

APet74 commented 7 years ago

Ok so... I am not the smartest person alive, obviously. I misspelled the AJAX request... So it should work now. You can either redownload the new release OR go into js/leaderboard/leaderboardFunctions.js and at the bottom change "ajax": "control/leaderboard/leaderBoardGrab.php", to "ajax": "control/leaderboard/leaderboardGrab.php", (board isn't capitalized. Also in views/leaderboards/index.php change kills and deaths to K/D and ADR as that is what is actually being reported not kills and deaths (should be 2 kills and 2 deaths)

szogi1910 commented 7 years ago

Unfortunately, still does not show details http://project-games.eu/statystyki/dd2mirage/leaderboards.php

APet74 commented 7 years ago

As stated above, please change the following inside of `/js/leaderboard/leaderboardFunctions.js':

"ajax": "control/leaderboard/leaderBoardGrab.php" to "ajax": "control/leaderboard/leaderboardGrab.php"

Here is a screenshot that shows that it is still wrong. http://petrzilkacoding.com/gitHubAPI/ssMemoryError.png Here is the change in the master code directory: https://github.com/ToxicRevolution/CSGORankMeWeb/blob/master/js/leaderboard/leaderboardFunctions.js#L140

APet74 commented 7 years ago

I am still checking out your site and it seems to still be down but it looks as though it is down because you haven't placed the new javascript file into the folder. Let me know if this is intentional.

szogi1910 commented 7 years ago

I uploaded the files, which are new to the github community, and then I reinstalled the script and as you can see on the page the effect

Edit By accident I closed the application

APet74 commented 7 years ago

Is it broken? It seems to be working when I view it.

szogi1910 commented 7 years ago

I do not quite understand what you mean by now

APet74 commented 7 years ago

Is there still an issue? When I go to your site the table loads and all the data looks proper. Is there still an issue that needs addressing?

szogi1910 commented 7 years ago

works fine, forcing ctrl + f5 several times

APet74 commented 7 years ago

We can close this issue then. Thanks!

On Sep 7, 2017 11:51 AM, "szogi1910" notifications@github.com wrote:

works fine, forcing ctrl + f5 several times

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ToxicRevolution/CSGORankMeWeb/issues/14#issuecomment-327859003, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgumR1TEqkrqr-TJ41lKodjUoLVGZDVks5sgB8tgaJpZM4PLAvh .