Occurs with

* feedapi
* feedapi_node

When deleting a feed with many feed items, PHP can time out while deleting feed item nodes. In this case the feed entry in the feedapi table will remain in the database, although the node of the feed is deleted. FeedAPI will keep on creating feed items for those truncated feed nodes.

// in feedapi.module
function nodeapi(...) {
      // ...
      case 'delete':
        // 'purge' removes all feed items on the feed node
        feedapi_invoke_feedapi('purge', $node->feed);
        db_query("DELETE FROM {feedapi} WHERE nid = %d", $node->nid);
        break;

Comments

aron novak’s picture

I only see one sane way: move the item purging to the cron time. Actually it's not a big deal to implement.

aron novak’s picture

Assigned: Unassigned » aron novak
Category: bug » task

I committed a workaround to prevent the timeout. Now it's time to find a solution :)
Here i summarize the possible ways to go, please share me your opinion about these!

  • Deleting on cron time. You delete the feed and at the next cron run, the items will be purged. Biggest disadvantage: not properly configured cron makes surprising result.
  • Ask the user before feed deletion if she want to delete items as well. Biggest disadvantage: unexperienced users cannot realize what means to purge 10000 node :) - and cannot make a good decision.
  • Make the feed items unpublished. Biggest disadvantage: the database will contain not relevant information.

Any advice is really appreciated!

alex_b’s picture

Component: Code » Code feedapi (core module)
Status: Active » Postponed

No changes planned.