Skip to Content Skip to Menu

My history logs have grown beyond capacity of my sql database and need to remove a lot of the entries in the logs....Help!

  • bucknla
  • bucknla
  • OFFLINE
  • Posts: 26
  • Thanks: 0
  • Karma: 0
10 years 8 months ago - 10 years 8 months ago #240212 by bucknla
I'm having a problem with my cbsubs history logs. I do my hosting with go-daddy and was informed that my sql database had grown beyond the 1GB limit. I thought there is no way my database could have gown so large in such a short period of time.
Upon taking a closer look all the tables except the jos_cbsubs_history history table which has grown to some 3.5GB in size. I need to get this back under the 1MB limit fast before I can look at what this error is. Can someone either show me a way to dump thousands of records of this error from the error or history log? I've tried using your cb_subs query tool in the history logs but I cannot do more than a couple hundred at a time and have some 196,000+ records I need to remove quickly ore have my database inactivated for exceeding the maximum size. Not sure how to properly do this without it effecting the subscriptions software. Could someone please help with this matter or give me some help constructing the correct delete query to remove these records? I have a pretty good working knowledge of MySQL but don't want to make matter worst. Any help would be greatly appreciated. I've got 3 days to bring this under control. Thanks in advance for taking the time to help.
bucknla.
Attachments:
Last edit: 10 years 8 months ago by bucknla. Reason: updated information as to chat is going on

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
10 years 8 months ago - 10 years 8 months ago #240583 by krileon
It's perfectly fine to empty the entire _cbsubs_history table within your database. The history log is not vital to CBSubs functioning in any way. However, it's going to keep filling up because you are ignoring notices, warnings, or errors; you should review the log entry and see if the issue can be resolved. Note unresolved notices, warnings, and errors do cause performance loss so it's always best to try and fix them.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 10 years 8 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
10 years 8 months ago - 10 years 8 months ago #240605 by ricco1
This happens to me a lot. I'm using: TRUNCATE TABLE yourTableName_cbsubs_history;

Regards
Ricco
Last edit: 10 years 8 months ago by ricco1.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
10 years 8 months ago #240694 by krileon
You may want to contact your host and see if a CRON job can be setup to run database queries regularly to clear it. We've plans to implement a CRON endpoint to handle history clean up in a later CBSubs release.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • MAYASIMA
  • MAYASIMA
  • OFFLINE
  • Posts: 183
  • Thanks: 22
  • Karma: 5
8 years 1 month ago #285192 by MAYASIMA

We've plans to implement a CRON endpoint to handle history clean up in a later CBSubs release


Is this an option yet?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
8 years 1 month ago #285226 by krileon
No, it has not been implemented yet, but you can do this with CB Auto Actions. Create a new auto action as follows.

Global
Triggers: None
Type: Query
User: Automatic
Access: Everybody
Action
Query:
Code:
TRUNCATE `#_cbsubs_history`

Then just schedule CRON to run the direct action URL under the global tab as needed. That's more or less all that the CRON endpoint in CBSubs would be doing. Could get more specific as well if you only want to delete certain history rows, etc..


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: MAYASIMA

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum