Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleting should use ElggBatch (Trac #4081) #4081

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 9 comments
Closed

deleting should use ElggBatch (Trac #4081) #4081

elgg-gitbot opened this issue Feb 16, 2013 · 9 comments
Labels
Milestone

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/4081 on 41864143-07-05 by trac user topdog08, assigned to brettp.

Elgg version: 1.7

It appears that if a spammer is fast enough, they can post enough material that any attempts to delete them will fail, because the server will time out the request. While I can pursue performance tweaks with my web host, this is a dedicated box, there is no other system activity at the time because I blocked all access but mine, it should be able to delete the spam, even if it takes a long time.

@elgg-gitbot
Copy link
Author

trac user topdog08 wrote on 41866094-04-18

For example, I had 42000 spam blog posts, was only able to delete any by taking offline, increasing PHP mem limit to 512M and timeout to 300sec and letting it run.

Unfortunately now in the morning half of spam posts are gone but my database is corrupt and the validator tool can't detect it so I'm not clear the best course of action at this point. Either way would really like to avoid this in the future!

Here is what I get now when I try deleting the three spam IDs that they created:

DatabaseException
Incorrect key file for table './xyz/elgg_entities.MYI'; try to repair it
QUERY: SELECT * from elgg_entities where guid=217778 and ( (1 = 1) )

DatabaseException
Incorrect key file for table './xyz/elgg_objects_entity.MYI'; try to repair it
QUERY: DELETE from elgg_objects_entity where guid=224102

DatabaseException
Incorrect key file for table './xyz/elgg_river.MYI'; try to repair it
QUERY: delete from elgg_river where object_guid = 188644

@elgg-gitbot
Copy link
Author

cash wrote on 41880130-02-28

Wow, 42,000 blog posts. I hate spammers.

This is going to be an issue for any user with a lot of content. If someone tried to delete me from the Elgg community site, I'm sure it would fail. If it does fail, we don't want anything bad to happen to the database.

In 1.8, I fixed a bug in the system logger. It was caching a report for every database modification (like a delete) and that was using up all the memory. There may still be other caching issues causing the out of memory errors.

@elgg-gitbot
Copy link
Author

cash wrote on 42003768-07-11

When deleting things in a container, we should use ElggBatch to avoid OOM errors.

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.8.4 by cash on 42003768-07-11

@elgg-gitbot
Copy link
Author

Title changed from HTTP 500 Server Internal Error deleting spammers to deleting should use ElggBatch by cash on 42003768-07-11

@elgg-gitbot
Copy link
Author

brettp wrote on 42039240-08-12

See also #4288

@elgg-gitbot
Copy link
Author

trac user Brett Profitt wrote on 42070574-12-23

Fixes #4081. Using ElggBatch to delete recursive.
Changeset: 4202d7d

@elgg-gitbot
Copy link
Author

trac user Brett Profitt wrote on 42070591-08-24

Refs #4081. Correctly calling setIncrementOffset(false) for deleting entities using ElggBatch.
Changeset: d082021

@elgg-gitbot
Copy link
Author

trac user Brett Profitt wrote on 42088991-02-09

Fixes #4081. Using ElggBatch to delete recursive.
Changeset: 4202d7d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant