Jason

Anonymous
We're only using Geeklog on our MySQL/MariaDB database. Unfortunately, it is very very slow to load and is causing 100% CPU usage. Any troubleshooting steps we can try to lower the usage so that the server/site is functional?

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1475
It's hard to say without knowing how much content the website has, the traffic patterns it has, and what type of hosting plan you have.

A basic shared hosting plan will work fine with a normal Geeklog website that doesn't get much concurrent traffic.
One of the Geeklog Core Developers.

Jason

Anonymous
We're using the $10 lightsail instance, it is 2GB of ram, 1vCPU and SSD storage. The number of users at any one time is under 10, but crawlers do index the content as well. The number of articles/posts is 13,000.

Anything else I can test/show to provide some clues?

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1475
Do you have template caching enabled?

You can also turn on caching for Articles and Static Pages. This way a compiled copy of the page is used to display instead of recreating it every time someone visits the page.
One of the Geeklog Core Developers.

Jason

Anonymous
Thanks for the suggestion, had theme cash on and article cache to "-1"

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1475
And the articles are using the default cache selection (it can be overwritten when editing an article)?

Have you optimized the database? (this can be done in the Geeklog Admin under DB Administration).

While 13,000 articles is a lot, normal homepage or topic views on the frontend doesn't use a lot of resources as they are simple select statements.

What other plugins are installed? Are their any code customizations to the website?

Do you have the BAN plugin install? This is a great way to block bots especially if you use the SFS database of spam IP files.
One of the Geeklog Core Developers.

Jason

Anonymous
And the articles are using the default cache selection

Can you provide more information on how to find/set this?

Have you optimized the database?

Yes

What other plugins are installed? Are their any code customizations to the website?

Spam-X, Static Pages, no customizations.

Do you have the BAN plugin install? This is a great way to block bots especially if you use the SFS database of spam IP files.

Is that the same as Spam-X? If not, can you link me to it, along with the SFS database of IPs.

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1475
And the articles are using the default cache selection


Edit an article and look at the cache time under publish options.


Is that the same as Spam-X? If not, can you link me to it, along with the SFS database of IPs.


No Spam-X is a different plugin. Here is the latest ban plugin

https://www.geeklog.net/downloads/index.php/file_ban_plugin-2.0.5

Please note with the ban plugin you will need to download the latest SFS IP database. This can be done in the plugin. Unfortunately I've had this update process not work on some web hosts or throw an error even if it does work (it has to download a zip file, extract it and then delete the zip file)

The Ban plugin will also work with the GUS plugin to check for other bad behavior's and ban ips automatically. I don't think you should install the GUS plugin though as it may slightly slow down your site.

Another option is to add a firewall rules to your htaccess file to help block bad behaving IPs. This is the one I use:

https://perishablepress.com/7g-firewall/
One of the Geeklog Core Developers.

Jason

Anonymous
Ban plugin install produced error:

E_WARNING(2) - mkdir(): File exists @ /sites/directory/geeklog/system/vendor/splitbrain/php-archive/src/Zip.php line 124

Cache Time on articles is "0". So that definitely seems to need to be at "-1" for them all. Is there anyway to accomplish this other than editing each article?

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1475
You would have to modify the database directly with something like PHPMyAdmin (which is available from most Hosts Control Panels).

The SQL Statement to update ALL articles would be: (this depends on what the prefix of your table name is)

Text Formatted Code
UPDATE `gl_stories` SET `cache_time` = -1

One of the Geeklog Core Developers.

Jason

Anonymous
Thank you, that worked to update the stories cache time.

Any ideas about the blocking plugin install error?
Ban plugin install produced error:

E_WARNING(2) - mkdir(): File exists @ /sites/directory/geeklog/system/vendor/splitbrain/php-archive/src/Zip.php line 124