1. imthebige
  2. RO CSVI
  3. Tuesday, 01 November 2016
  4.  Subscribe via email
Hello,

As i mentioned in my earlier messages about cron issue that importing wrong entries in database.

category_path has been processed like Process path: product category/2016-10-25T10:43:26-07:00 which is product_modified date value in my import file.

Added like this way : category

2016-10-27 05:00:05
2016-10-27 05:00:05
2016-10-27 05:00:05
2016-10-27 05:00:05
2016-10-27 05:00:05
2016-10-27 05:00:05
2016-10-27 05:00:05

This is a old issue : https://csvimproved.com/forum?view=topic&catid=44&id=33529

As per Tharuna I emailed him all the details of my website earlier.and according to him :-

both the cron jobs running at same time. i think that would be a cause, why cant both cron run with some time difference? Try it and let me know.

So i send you my cron email timings below and cron url Please check

1) Product Cron job : Run (Once per 15 minutes)

/usr/local/bin/php70 /home/juicy672/public_html/administrator/components/com_csvi/helper/cron.php --key="testimport" --template_id="51" --file="/home/juicy672/public_html/cron/Tmpfile.csv"

2)Brands Cron job : Run (Once per hour)

/usr/local/bin/php70 /home/juicy672/public_html/administrator/components/com_csvi/helper/cron.php --key="Final Brand Cron" --template_id="56" --file="/home/juicy672/public_html/cron/1.csv"

See the screenshot : http://prntscr.com/d1jay9

http://prntscr.com/d1jb6d

Thanks & Regards
Accepted Answer Pending Moderation
Hello,

There is something else coming to mind, can you check if the table csvi_processes has any data in them? If yes, can you empty that table and see if that solves the problem?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 21
Accepted Answer Pending Moderation
Hi,

yes,It has no sense to me as well.But you can see in the screenshot which i send you earlier that sometimes it take correct file or sometimes it not :( which is weird.

Cron job set up now as :

1) /usr/local/bin/php70 /home/juicy672/public_html/administrator/components/com_csvi/helper/cron.php --key="Brands" --template_id="59"

2)/usr/local/bin/php70 /home/juicy672/public_html/administrator/components/com_csvi/helper/cron.php --key="testimport" --template_id="51"

See the screenshot : http://prntscr.com/d4isz1

I am posting debug log files for failed brands import.

**Yes there is data in csvi_processes table.Okay i will check it with this and let you know what happened**

Please find and check

Regards
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 22
Accepted Answer Pending Moderation
Hello,

This debug log shows that everything is OK. There are no weird categories created according to this debug log. Perhaps the wrong log?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 23
Accepted Answer Pending Moderation
Hello,

:huh:

I have checked with empty the csvi_processes table also.But still same issue occured.Really it becomes headache now.

I have send you the log file of template name- brands and file which is imported products.csv file but it shows that everything is OK.

Now i am sending you the log file of template name-Final cron import which is imported products.csv file.Here i can see the wired categories.

Please check a log file which i am attaching now.

Also i am thinking that is this is a time problem for cron ?? At what time of gap both should be run ?? Any suggestions ?

Thanks
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 24
Accepted Answer Pending Moderation
Hello,

I figured it all out. We asked you before to set the cron jobs to not run on the same time but in the debug logs I have seen you do run the cron jobs at exactly the same time.

You have set both cron jobs to run at 0 0, which means both jobs runs at midnight 00:00. In another screenshot you sent us, you had set the time for the product import to */15 and the time for the brand import to 0. This means that the product import runs every 15 minutes, so that is 15/30/45/0 and the brand import only runs on 0. So you will get 3 imports that are ok and 1 that is not OK because on 0 they both run at the same time.

So if you change one cron job to run at 5 0 and the other on 0 0, they won't run at the same time and the import should be fine.

As the jobs run at exactly the same time, CSVI creates a temporary folder based on the time it is run. Now your jobs run at the same time so whichever job comes second will use the temporary folder of the job that came first and mess up the import. I am going to make a change to the script to prevent this from happening and post the solution here when done.

Do you want any of the jobs to run more than once per hour?

Edit:
I have attached a patchfile that you can load. After that you should be able to run the cron jobs at the same time.
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 25
Accepted Answer Pending Moderation
Hello,

Sounds Good...I also thought there was problem with time somewhere..:)

Regarding : Do you want any of the jobs to run more than once per hour?

->No I don't want any of the cron jobs to run more than once per hour.I am changing time to just check it one file time i used after 10 minutes or 5 minutes and other after 15 mins or 20 minutes .so by this way may be jobs run at exactly the same time.I am just testing the cron job by changing the time so no need to wait for hours. but in actually i need cron jobs to run once per hour.

Regarding : So if you change one cron job to run at 5 0 and the other on 0 0, they won't run at the same time and the import should be fine.

->Can i try this one.Is this really working fine ? 0 0 means once per day ?? or once per hour ?

Regarding : I am going to make a change to the script to prevent this from happening and post the solution here when done.

->Thanks for it.I am waiting..:)

Regards
  1. more than a month ago
  2. RO CSVI
  3. # 26
Accepted Answer Pending Moderation
Hello Roland,

Thanks for the patch file.I want to know is need to empty the tables in database after patch file uploaded and then do import ??
  1. more than a month ago
  2. RO CSVI
  3. # 27
Accepted Answer Pending Moderation
Hello,

No need to empty the tables in the database, you can load the patch file and then run your imports.

->Can i try this one.Is this really working fine ? 0 0 means once per day ?? or once per hour ?
Look at your crob job settings, you already have it ;) First 0 is minutes and second 0 is hours. That means once per day as you only have midnight once every 24 hours. If you want it to run once per hour, just set 0 for minutes and * for hour.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 28
Accepted Answer Pending Moderation
Hello, I have a problem with a cron job for exporting virtuemart products to an xml file.
I have configured the cron through cpanel with the following command:
/usr/local/bin/php /home/mydomain/public_html/administrator/components/com_csvi/helper/cron.php --key="mykey" --template_id="1"

The log email reports the following error:
Use --help to see the help information
Processing started...
Template XML

Fatal error: Call to a member function add() on null in /home/mydomain/public_html/administrator/components/com_csvi/helper/cron.php on line 377


I use Joomla 3.6.4, PHP 5.6.27, CSVI Pro 6.6.4.
What can I do?
  1. more than a month ago
  2. RO CSVI
  3. # 29
Accepted Answer Pending Moderation
Hello,

There is an issue with cron export when an error has occured. This error message cannot be written to the log, that is why you see the error.

You can load the attached patch file that should solve the fatal error you see.

This won't solve the other error you get but at least we will be able to see what that error is. Can you give this a run and let me know what you find?
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 30
Accepted Answer Pending Moderation
Hi, I added the patch. Now it shows the following error:
Processing started...
Template xml
The apcu Cache Storage is not supported on this platform.

If I disable the joomla cache, then the export is finished correctly.
So, I see that apcu or apc cache breaks the cron. Why?
  1. more than a month ago
  2. RO CSVI
  3. # 31
Accepted Answer Pending Moderation
Hello Roland,

I have attached the patch file given by you and check the import with the cron time.Now It is working fine.No mess up in cron import now..:)

Thanks so much.Appreciate your help..:)

KInd Regards
  1. more than a month ago
  2. RO CSVI
  3. # 32
Accepted Answer Pending Moderation
@imthebige Thank you for hanging in while we sorted out the issue. Glad to hear we did find the cause and were able to solve it.

@trabica Looking at the Joomla code, you need to enable apcu cache on the CLI instance of PHP as well. This is another PHP instance than the one used to run the website.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 33
Accepted Answer Pending Moderation
@trabica Looking at the Joomla code, you need to enable apcu cache on the CLI instance of PHP as well. This is another PHP instance than the one used to run the website.

I have the apcu cache enabled in php settings in my cPanel. I checked it again, but it still has this problem.
  1. more than a month ago
  2. RO CSVI
  3. # 34
Accepted Answer Pending Moderation
Hello,

I don't think that it is enough because via cPanel you control the PHP instance used for your webserver and not for the CLI. I do not know how to configure apcu but I would think that the php.ini used by the CLI instance should point to a valid apcu setup.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 35
Accepted Answer Pending Moderation
Hello, I told my hosting company and they turned apc.enable_cli to on. Now the cron works fine.
Thanks for your help!
  1. more than a month ago
  2. RO CSVI
  3. # 36
  • Page :
  • 1
  • 2


There are no replies made for this post yet.
Be one of the first to reply to this post!