Advertisement:

Author Topic: [SOLVED] Database Log Table Maintenance Plugin  (Read 1074 times)

Aficionado

  • Guest
[SOLVED] Database Log Table Maintenance Plugin
« on: October 21, 2016, 12:07:33 pm »
I see something strange in the Configure of this plugin:

Scheduled CleanUp: 20 November 2016 @ 08:04:16   

Next Daily Cron: 24 January 2016 @ 05:07:50   

Both are wrong, since we are 21 today and also the Cron daily is saying 24 Jan 2016

@Dev101 you may look at it.

Thanks
« Last Edit: October 26, 2016, 10:42:46 pm by Aficionado »

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Database Log Table Maintenance Plugin
« Reply #1 on: October 26, 2016, 03:53:46 am »
Hi Aficionado,

Please use support ticket system in the future @ Market for plugins released there, as I really don't have much time lately for forums. It does not matter if the plugin is free or paid one, support works for both.

Now, that is really strange, I will look into it.

Can you post me your screenshot of oc_t_cron (or your prefix_t_cron) table from phpMyAdmin, and then also tell me what does plugin page says about next crons? Also, what is your cleaning interval setting? Example image given below.

Thanks

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Database Log Table Maintenance Plugin
« Reply #2 on: October 26, 2016, 04:18:50 am »
Quote
Scheduled CleanUp: 20 November 2016 @ 08:04:16

Both are wrong, since we are 21 today

Well, at least this part is not buggy. You see, in order to simplify time calculations, plugin does not *really* count months (and 28/29/30 or 31 days in it), but instead uses fixed interval multiplied by 30. So, in reality it is not a month unit (true at least) but a more generalized one that assumes that each month is equal and has 30 days.

I should probably change this to be "days" as more accurate or at least hint users that month = 30 days (translation: I am in no hurry to do it :-)).

Now, what I am curious about is your next daily cron value @ database...

Aficionado

  • Guest
Re: Database Log Table Maintenance Plugin
« Reply #3 on: October 26, 2016, 04:34:29 am »
@dev101

It seems that on 3 of my 5 Osclass installations (100% identical for script and plugins and versions and server), the problem exists.

BUT the tables also are wrong. I will examine this closely and let you know.

Thanks


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Database Log Table Maintenance Plugin
« Reply #4 on: October 26, 2016, 04:40:15 am »
Ok, as I have initially suspected, you have some issues with crons.
Plugin correctly reports next daily cron value, no doubt about this now.

Now, what your problem(s) could be? I have several ideas out of my head, but of course could be something else:

a) Your crons never complete all the tasks for some reason (timeout? slow server? some problematic function/loop/plugin/theme bug?). This would be the hardest the catch, as there is currently not much help inside core when this happens.

b) Your cron does not work at all. If it is internal "auto-cron", something could be wrong (actually, X reasons). If you use external triggering, i t is possible that it stopped working in the meantime (new server, old config etc...)

c) something unrelated to a) and b)

Now, you need to investigate it clearly.
Regards

Aficionado

  • Guest
Re: Database Log Table Maintenance Plugin
« Reply #5 on: October 26, 2016, 07:46:49 am »
Thanks dev101 for the help.

Probably a plugin confict with the internal CRON i use, still i have no errors anywhere, even in debug.log

Hard to find, i will need to disable one by one.

I will keep you informed, probably nothing to do with your plugin.


Aficionado

  • Guest
Re: Database Log Table Maintenance Plugin
« Reply #6 on: October 26, 2016, 03:56:19 pm »
It seems that MAYBE the Renew plugin could conflict in some way, since after disabling it ... everything came back to normal.

I will re-enable it in a couple of days (since i heavily use it) and see.


Aficionado

  • Guest
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #7 on: October 26, 2016, 10:43:42 pm »
It doesn't seem to be a plugin error conflict after all.

I switched to external CRON and seems to be fine now.


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #8 on: October 28, 2016, 02:56:42 am »
Well, as long as you've solved it it's fine :)
But, it is abnormal condition that auto-cron does not work... to say at least.

Regards,
dev101

Aficionado

  • Guest
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #9 on: October 28, 2016, 03:14:30 am »
Well, as long as you've solved it it's fine :)
But, it is abnormal condition that auto-cron does not work... to say at least.

Regards,
dev101

Yes and i HATE when things like that happen to my websites. Things that i can't debug and i'm forced to switch to some other solution, leaving the overly problem intact.

But latetly i have very little time to spend to all that, they are pretty much to automatic.

Thanks again for your help.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #10 on: November 03, 2016, 06:51:05 pm »
Just remembered that you are using ZB Block, with default rules it will block osclass internal cron (just as it blocks wp cron).

Check your killed_log.txt for something like this:

Code: [Select]
#: 1 @: Thu, 03 Nov 2016 15:00:00
Host: ...
IP: A.B.C.D
Score: 2
Violation count: 1 BANNED
Why blocked: Hosting company (A.B.C.D address/ASN). Possibly hostile scraper/harvester, signature may interfere with some Wordpress installs (SPD-0087).
Query: page=cron
Referer:
User Agent: Wget/1.15 (linux-gnu)
Reconstructed URL: http:// mywebsite.com /index.php?page=cron

You will need to add into customsig a bypass rule in that case, for example:

Code: [Select]
// IP address White List Array
$whiteListIPs = array('localhost', '::1', '127.0.0.1', 'A.B.C.D'); // where A.B.C.D is IPv4 address of your server/website

// ZB Block Osclass Cron Bypass
if ((in_array($address, $whiteListIPs)) && (inmatch($query,'page=cron', ''))) {$ax -= 1; $whyblockout = $whyblockout . Osclass Cron Bypass”;}

This will lower score for -1, but if you also block your own hosting company (above example with score = 2), you will need to bypass it as well in order to make this rule fully effective. I cannot know that part unless you confirm from your logs any findings.

Regards

Aficionado

  • Guest
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #11 on: November 03, 2016, 08:27:24 pm »
Thanks dev101, i have removed ZBBLOCK a few months ago.


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #12 on: November 04, 2016, 02:49:46 am »
I don't believe it! :)

Anyway, if you switched to something else, then it is possible that that script interfered with crons. Just my guesswork.

Aficionado

  • Guest
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #13 on: November 04, 2016, 02:59:23 am »
I don't believe it! :)

Anyway, if you switched to something else, then it is possible that that script interfered with crons. Just my guesswork.

True. After PHP 7x there were many-many problems and the script is now totally abandoned by the creator. Some people try to keep it alive, but ...

No i haven't switched to anything else for Osclass, just for Wordpress (Shield Plugin).

In any case extrenal cron twice per day seems to work just fine, so i'm happy.


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [SOLVED] Database Log Table Maintenance Plugin
« Reply #14 on: November 04, 2016, 03:06:00 am »
Yes, I am among those who try to at least contribute with signatures... also done some core mods, but cannot release that work until things get clear in what direction it will be going. CIDRAM (a side project by Mike) is not a true replacement at this stage, so... we wait. :(