System Hangs When adding or modifying serials

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238160

-- url of the page with the problem -- : dollarsaverprograms.com
-- HikaShop version -- : 2.6.2
-- HikaSerial version -- : 1.10.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Firefox 45.0.2
-- Error-message(debug-mod must be tuned on) -- : None

Hi,
When trying to add serials to the system in the admin area, the system hangs "Waiting on the server to respond" Server logs indicate an internal server error. I'm getting nothing else for errors or indication as to what could be wrong.

Seems I can add a pack, but when I go to enter a serial everything just stops responding. If I close the browser, wait a minute or so, then log back in, I can do other things but not work with HikaSerial. If I try it stops again.

Any assistance gratefully received.

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238197

Hi,

Can you please provide more details about how you're trying to add serials into HikaSerial ?
Is that an import or a serial creation in the backend ?
If it's an import, which import type are you using ? What is the number of serials you're trying to insert ?
Would it be possible to have a "sample data" (you can replace the serial key by some "X" if you want to let them private).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238226

Thanks for the response.
I was manually entering a test product, pack and serial. This site is not yet live, I've been importing thousands of serials from an existing site and they all seem to go in OK. Yesterday I added a payment method and was going to start testing the cart and serial generation.
So I entered a new item that could be deleted later, added a pack manually and then a serial of 001, 002 & 003 and thats when it started stalling.

There are currently 313,293 serials, 3072 packs and 3149 items. Am I over capacity?

More than happy to give you admin access if it would help.

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238236

Hi,

I'm still not understanding the precise action your doing.
Can you please explain it with concret details where you have your issue ?

I can't provide you any element of answer if I don't know and understand the real context.

After that, regarding the number of serials and packs you have, it could be useful to add an INDEX in the database for the table "serial" ; but I can't say right now that your issue is related to that.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238273

Ok, step by step, what I'm doing:
1. login to the Administrator
2. Went to Components/HikaSerial/Packs
3. Clicked "New" and added a new pack.. Using "No Pack Data Provider" & an available Vendor. Left all other settings alone
4. Went to Components/HikaSerial/Serials
5. Clicked "New" and added/typed a serial number (004) in "Serial Data", Chose new Pack from drop down, then Save & Close
6. At this point the system hangs and the wheel just keeps spinning and status sits on "Waiting for (site)

Please see attached image

Attachments:
The following user(s) said Thank You: Jerome

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238282

Hi,

Thanks ; I will help me a lot in order to know what code is called and what could be the issue.
I'll make some tests in my local website in order to analyze the queries and try to generate some big quantity of sample data.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238286

Hi,

Do you have the setting "link product quantity" activated ?
www.hikashop.com/support/documentation/1...ink_product_quantity

That feature could ask for a lot of resources because when you update/create a serial ; the product quantities will be updated and the current query is a little bit "heavy".
It can totally explains your issue ! (and the solution would be to deactivate the feature).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238288

That did it. But the unfortunate thing is that I REALLY need to have the quantity of serials left show on the front end. Is there any other solution?

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238289

Hi,

The solution would be to rewrite the algorithm in order to have optimized SQL queries.
Like I wrote, the current system is "heavy", there is one single query which link 4 tables (product, product_pack, pack, serial) and regarding the amount of data you got ; it could easily explain the overload.
By changing the algorithm and only target one specific pack (or one specific product) ; performing 2 (or 3) small queries instead of one big... It could be possible to improve the speed. But it requires development and tests !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238366

Before going to far into rewriting the algorithm, I'm sure that a lot of those records can be deleted, but I want to make sure that I do it in manner that won't adversely affect database integrity.

Steps to bulk remove unneeded serials and packs: Is it safe to mass remove all "used" serials using phpmyadmin, then all "empty" packs from within the administrator? Remember this site is not yet live and all this data was transferred/imported from an older antiquated system. I'm wondering if some of my problem is just the sheer size of those tables. Please advise.

Then if that doesn't work I guess the 1st question is your availability/desire to rewrite the algorithm plus time and cost.

I've also started experiencing another issue with the Attachserial plugin. Tried to open it this morning to make some changes and I get the following error. Don't know if it could be related to what we are doing or not:
An error has occurred.

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY pack_name' at line 1 SQL=SELECT pack_id, pack_name, pack_data, pack_generator FROM #__hikaserial_pack WHERE pack_id IN () ORDER BY pack_name

Thank you for all your help.

Last Edit: 2 years 1 month ago by a2zcs.

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238370

Hi,

Does your "attach serial" plugin configuration is link with a pack ?
Because I don't see any pack_id in the SQL query ; which indicate that the configuration might be invalid.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238403

I wasnt sure, so I created a new record and was sure to include a pack. I get the same error on the new one if I try to go back into it to modify it.
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY pack_name' at line 1 SQL=SELECT pack_id, pack_name, pack_data, pack_generator FROM #__hikaserial_pack WHERE pack_id IN () ORDER BY pack_name

But with that question asked, is there a way that I can use the same attachment with ALL pack so as we don't have to enter them all in?

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238404

Hi,

My bad !
In the file "administrator/components/com_hikaserial/classes/pack.php", please replace

$values = array_merge($values);
JArrayHelper::toInteger($values);
By
$values = array_merge($value);
JArrayHelper::toInteger($values);
And it will fix that issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238408

Perfect, removing that 's' did the trick for that issue.

What do you think about it being safe to mass remove "used" serials? I wouldn't be breaking some other relationship somewhere would I?

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238416

Hi,

When you delete a "used" serial which is assigned to an order ; you will remove the serial to the order.
The customer won't be able to see the serials in the front-end (and you in the backend). The data will be really removed.
So, if you perform a "refresh association" (a manual action) or if the order re-switch from an "invalid" to a "valid" status ; new serials will be assigned to the order.

If you do not use a generator and one of your pack is empty (or do not have enough serial) ; it is possible that some orders won't have serial association (if there is no "link product quantity"). That's one of the reasons of the "refresh association" button.
When you're using a generator, that kind of issue is less frequent (except if your generator can fail).

That's why I'll recommend you to delete used serial only on "old" orders.
You can for exemple delete all used serials which are linked to orders confirmed X days before.
Thanks to the "order_invoice_created", you can know when an order has been confirmed.

In that case, when an order have more than X days and do not have serials ; you know that the serials have been used (if there were serials).

Once the HikaMarket 1.7.0 release will be done ; I'll finish the HikaSerial release.
I want to perform some stress tests for the next release and see if I can improve some database elements ; like adding more indexes in order to increase some queries speed.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238430

Since I had not imported any orders from the old system, I went ahead and deleted all of the used serials and empty packs. Unfortunately it had no affect on the original problem. The system is still hanging when I try to add serials either one at a time or if I try to import them. :(

Did you see my other question about the attachserial plugin? I want to use one attachment for all serials. Is there a way to NOT have to enter in every Pack in the Plugin Parameters? Maybe delete that filter completely?

Also when trying to go through the pages of packs in hikaserial I get this error:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 SQL=SELECT serial_pack_id, count(*) as `cpt` FROM #__hikaserial_serial WHERE serial_pack_id IN ( );

Thanks!

Last Edit: 2 years 1 month ago by a2zcs.

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238503

Hi,

There is one line in the attachserial plugin which make the "non filter" not possible.

	if(empty($params) || empty($params->attach_email) || empty($params->packs))
		continue;
So if the plugin instance do not have "packs", the instance is skipped.
And below there are checks to see if there are serials in the packs or not.

One possibility is to store in that "params->packs" the boolean value "true" (instead of a string or an array).
With the current configuration interface, that is not possible because a namebox is used and there is nothing in the function "onPluginConfigurationSave" to store such boolean value in the configuration.
It means that, today, the best would be to modify the data directly in the database (or to duplicate the plugin to remove that checks or change the configuration save function).

I do understand you need ; I will see what I can do in the plugin to allow that but I cannot remove these checks like that because it could affect other websites.
So if I want to change that rule ; I have also to find a solution to not change (break) production website which are using HikaSerial and could have an attach serial configuration with no packs assigned (which do not generate any content).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238852

Hi,
While I'm waiting for you to figure how to get accomplish this, is there a maximum number of packs that should be entered into that field before creating a new record? I've got about 1600 active packs.

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

  • Posts: 22431
  • Thank you received: 3487
  • MODERATOR
2 years 1 month ago #238853

Hi,

Best for you would be to apply a patch in the "attach serial" plugin.
You can enter a big number of pack in the plugin configuration but there are few limits. The first one is the size of the column in the database and the second one is about perf (because more you add packs in the configuration, more data the plugin will have to handle).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 151
  • Thank you received: 5
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
2 years 1 month ago #238920

Ok, thanks.
Actually the more I think about it, the more I believe I don't want one certificate to handle all serials. There are benefits to having at least a few different options for them. Though the list of packs would still potentially be large.
Thanks.

The following user(s) said Thank You: Jerome

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

Moderators: Obsidev
Time to create page: 0.130 seconds
Powered by Kunena Forum