Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: d0dja on August 19, 2019, 12:47:47 PM

Title: Fresh new installation flew, now crawling
Post by: d0dja on August 19, 2019, 12:47:47 PM
Hi everyone -- I set up a new forum at forum.iotcouncil.org.za this morning. It was working like a trooper, changed theme, added some boards, all fine.  SMF 2.0.15 running on Ubuntu 18.

Then later today I noticed it was running incredibly slow ... like 2-3 minutes to open a page, if at all.

It's running in an AWS EC2 t2.micro instance, 30GB storage, 1GB memory which afaik is enough. If I check resource utilisation memory and processor load is less than a percent so it looks like something is waiting, not overloaded.

I checked caching ... APC is not enabled, but it seems that stuff is no longer so important in php 5+. I turned caching off and on, made no difference. Fiddled with various things, but I'm shooting in the dark.

I don't think it's an out of memory issue ... phpmyadmin web console is flying, ssh session runs super fast to that box.

Any tips on where I can start troubleshooting? I had a look in apache logs, nothing obvious. 

Title: Re: Fresh new installation flew, now crawling
Post by: vbgamer45 on August 19, 2019, 12:51:50 PM
Any slow SQL queries? I would move to PHP 7.1 with opcode caching enabled. Do a reboot as well.
Title: Re: Fresh new installation flew, now crawling
Post by: d0dja on August 19, 2019, 01:05:33 PM
After rebooting it's the same.

I can understand wanting to optimise performance, but this went from nice and fast (albeit with no real stuff on the forum) to dead slow. It's not the latest version of everything -- but then again, a year or two back php5.5 worked perfectly well.

Title: Re: Fresh new installation flew, now crawling
Post by: Arantor on August 19, 2019, 01:17:20 PM
Not sure this is an SMF problem, think you might be being throttled by AWS after hitting a round of initial activity going above the threshold of the instance and burning through your burst credit.
Title: Re: Fresh new installation flew, now crawling
Post by: d0dja on August 19, 2019, 02:12:40 PM
Barely any traffic. About a meg or so when downloading various stuff...

(https://live.staticflickr.com/65535/48577762037_a4333ef5e3_n.jpg)
(https://live.staticflickr.com/65535/48577601796_9d21b42ba3_n.jpg)

Barely even a knee trembler. No alarms on AWS. And if it was a capping thing, web version of phpmyadmin would also suffer.

I've done stuff on t2.micros before and you can hit them quite hard without complaint. Usual problem is running out of memory...

If i watch TOP output when I refresh the page, mysql only briefly flashes up before everything goes back to waiting (systemd).
Title: Re: Fresh new installation flew, now crawling
Post by: d0dja on August 19, 2019, 02:19:58 PM
if I check in the database table "smf_error_logs" there's an absolute storm of these

|     1775 | 1566238391 |         0 | 155.93.131.138 | ?/                                                                                                       | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1516 |
|     1776 | 1566238391 |         0 | 155.93.131.138 | ?/                                                                                                       | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1553 |
|     1777 | 1566238391 |         0 | 155.93.131.138 | ?/                                                                                                       | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1584 |
|     1778 | 1566238391 |         0 | 155.93.131.138 | ?/                                                                                                       | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1595 |


goes back some way
|     1407 | 1566227292 |         1 | 196.14.169.11  | ?action=admin;area=theme;df0229b9=37192ff44e3ed91bc30645783f9c10af;sa=admin                              | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1305 |
|     1408 | 1566227292 |         1 | 196.14.169.11  | ?action=admin;area=theme;df0229b9=37192ff44e3ed91bc30645783f9c10af;sa=admin                              | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1316 |
|     1409 | 1566227292 |         1 | 196.14.169.11  | ?action=admin;area=theme;df0229b9=37192ff44e3ed91bc30645783f9c10af;sa=admin                              | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1392 |
|     1410 | 1566227292 |         1 | 196.14.169.11  | ?action=admin;area=theme;df0229b9=37192ff44e3ed91bc30645783f9c10af;sa=admin                              | 8192: Function create_function() is deprecated | 37192ff44e3ed91bc30645783f9c10af | general    | /var/www/html/Sources/Subs.php | 1491 |


From a bunch of different IPs
Title: Re: Fresh new installation flew, now crawling
Post by: Arantor on August 19, 2019, 02:25:14 PM
That might be your problem; PHP 7.2 is not supported properly and the logging of the errors will have contributed towards your credits.
Title: Re: Fresh new installation flew, now crawling
Post by: shawnb61 on August 19, 2019, 03:13:53 PM
PHP 7.2 is not supported at all by 2.0.x.
https://wiki.simplemachines.org/smf/SMF2.0:Requirements_and_recommendations
Title: Re: Fresh new installation flew, now crawling
Post by: d0dja on August 19, 2019, 03:28:52 PM
OK, so nuked the server and did a fresh install with php 7.1. Let's see how it goes... thanks Arantor.

Didn't pay attention to standard apt-get for php installing 7.2...