Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

--Parameters For Cron Jobs Rate Topic   - - - - -

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11322 posts

Posted 06 July 2019 - 12:02 AM #1

A client of mine recently switched servers.  When using a cron job command like:

php ./ouradminpanel.php --dispatch=some_addon.cron --cron_password=my-cron-password

Or using a full path tho the admin panel.

 

It executes but seems to just chew up all available memory while it's in the init() routine.  My guess is that it's in mysql.

 

After it runs silently (even a bad --cron_password value never generates an error) for over 2 minutes, it simply returns.  I believe the process actually died with a SIG_SEGV but that is no silenced.

 

The same command runs in about 2 seconds when run through apache.

 

Anyone else seen this?  It not only is affecting my addons but also SimTech and Cart Power as well. They all behave the same.

 

No where for php is there any reference to '--param' parameters other than using getopt() to parse it.  But I can't find where it might be being parsed internally in cs-cart.

 

Curious if anyone else has seen this issue and solved it.  The hosting helpdesk is pretty useless.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11322 posts

Posted 07 July 2019 - 05:02 AM #2

Okay, I finally found the problem.  The customer had disabled user_id 1 which was causing the app to get stuck in a continuous loop trying to login a disabled user.  To me, that's pretty poor coding and a more appropriate approach should be to find an active "is_root=Y" user verus hard coding it to user_id 1.

 

Hopefully this will help someone else out in the future.  But I'd still like to find where it converts $argv arguments to $_REQUEST parameters.  I did a grep for getopt() but didn't see anything.  Maybe buried off in the BOOTSTRAP code somewhere which is compressed. 


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.