Project

General

Profile

Actions

Bug #6734

closed

Bug #6731: Out-of-control queries on production server

PressForward RSS fetching requires very large number of queries

Added by Boone Gorges over 7 years ago. Updated about 7 years ago.

Status:
Rejected
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
-
Start date:
2016-11-15
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

The PressForward plugin is built around an RSS aggregator that fetches feed items on a wp-cron job. The fetching process is very resource-intensive. I've tracked a large number of requests that have required more than 1000 database queries. One such query log is attached (it stops at 1000 queries because this is what my logging tool is built to do - I don't know how much longer it goes).

A few preliminary thoughts:
- This does not appear to be a case of a query loop. The queries are generally distinct.
- The process of fetching an RSS item and inserting it into the WP database is extremely resource-intensive. By my count, each item requires about 46 db queries, about half of which are INSERT/SELECTs
- I seem to remember (from time spent working on earlier versions of PF) that feeds were processed in batches/chunks, but the code now suggests that this may not be the case - it looks like all subscribed feeds are checked during every cron job
- The last update to PF on the Commons was on Oct 21 (4.0.5 > 4.1.2). It's possible that there was something in that update that increased overhead, or perhaps this was the version where PF stopped processing in batches
- Some recent events at the GC have pushed the use of PF, so it's possible that this was a latent issue that became evident only through more extensive use

I'm going to reach out to Aram, the lead developer of PF, to see if anything comes to mind that might help us narrow in on any potential problems.


Files

pf.txt (1.34 MB) pf.txt Boone Gorges, 2016-11-15 09:46 PM
Actions

Also available in: Atom PDF