Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

September 19, 2021, 12:03:30 AM

Login with username, password and session length
Members
  • Total Members: 3823
  • Latest: Ritsu
Stats
  • Total Posts: 192487
  • Total Topics: 21001
  • Online Today: 49
  • Online Ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 48
Total: 48

Author Topic: Infinite loop and my CPU usage shot up to 99%  (Read 307 times)

0 Members and 1 Guest are viewing this topic.

Offline Rock Lee

  • Jr. Member
  • **
  • Posts: 26
Infinite loop and my CPU usage shot up to 99%
« on: August 26, 2021, 07:15:40 PM »
Well I go back to these sides and I am translating / correcting what I had, that's why I passed it to the host as it was in my localhost... So I was correctly putting the links when I had to edit the part of "?action=tpadmin;sa=settings" and the url was "C:\wamp64\www\tp-images\\" I tried to change it but it wouldn't let me ... I even tried to mock the db but I had nothing to uninstall and reinstall. It marked me in the file (I leave the lines below) ../source/TPortalAdmin.php

Code: [Select]
==>2785: while(false !== ($file = readdir($dir)) ) {
2786:         if(($file != '.') && ($file != '..')) {
2787:             if(is_dir($src . '/' . $file)) {
2788:                 tp_recursive_copy($src . '/' . $file,$dst . '/' . $file);
2789:             }
2790:             else {
2791:                 copy($src . '/' . $file,$dst . '/' . $file);
2792:             }
2793:         }
2794:     }
2795:     closedir($dir);

I'm not sure what did this shoot ... I'll do more tests and try to explain better.


Regards!



I need to add it is TP 2.1.0, SMF 2.0.18,PHP: 7.2.34
« Last Edit: August 26, 2021, 07:44:15 PM by Rock Lee »

Offline @rjen

  • Support Team
  • *
  • Posts: 2946
    • FJR-club Nederland
Re: Infinite loop and my CPU usage shot up to 99%
« Reply #1 on: August 26, 2021, 11:09:06 PM »
Sorry, you lost me…
Running TP2.1.0 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Offline Rock Lee

  • Jr. Member
  • **
  • Posts: 26
Re: Infinite loop and my CPU usage shot up to 99%
« Reply #2 on: August 27, 2021, 04:49:42 PM »
Sorry it was half late and I was not thinking correctly... go again and more slowly to explain myself :)

I am updating my entire site due to various failures and things are somewhat old, to work well with PHP 7.4 (after being disconnected so much for not having internet). First I had a test site that I was working on my computer with wamp which works all correctly so I passed everything to my hosting in a test folder in case something strange came up. I started testing functions change values to make sure everything works and I did not come across anything weird in that some URL of certain things were under the url "C:\wamp64\www\" which can change smoothly mostly.

The problem comes when I tried to change "Path where TinyPortal images are uploaded to on your server" that had the url "C:\wamp64\www\tp-images\\" that happened to change for the correct one and I give it to save. It does not load the page again as it regularly does, added the url was not modified and then I modified it directly in the database... Where I realize the CPU is 99% next to the error log reaching 400k marking the same that you leave in the attached image.

I had to uninstall because even though I deleted the part I was told it was still in an infinite loop, when I reinstalled everything was normal. Now I just tried it and everything works normal, which leaves me with doubts since years ago I used TP on all types of servers, something similar never happened to me...

I guess that's why the tests are :doh:, now I think I can explain more O0


Regards!

Offline @rjen

  • Support Team
  • *
  • Posts: 2946
    • FJR-club Nederland
Re: Infinite loop and my CPU usage shot up to 99%
« Reply #3 on: August 27, 2021, 11:46:59 PM »
The option to change this path is only added in TP 2.x, so that may explain why this did not happen in the past.

Moving an install across domains will require a change of the paths. I have never heard of getting into an infinite loop because of that …
Running TP2.1.0 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Offline Rock Lee

  • Jr. Member
  • **
  • Posts: 26
Re: Infinite loop and my CPU usage shot up to 99%
« Reply #4 on: August 28, 2021, 01:10:04 PM »
Because something similar never happened to me until I do not know why he did that and in any case he should not have generated so many reports. I changed the addresses when I made changes of domains many times and something similar never happened to me, I get syntax or translation errors but never a similar loop.

I tried to replicate the same error but could not replicate I suppose it must have been something fleeting, that moment it was like 23pm & 1am :idiot2: I'm going to do more tests but I suppose it was a set of very specific things and some bad luck I suppose :P