504 Gateway Time-out
The server didn't respond in time.
What can I do to solve this as it is a wholesale site which should be normal to have a lot of product in the basket
Opencart Version 3.0.3.8
Thanks for any directions or tips
See: https://www.php.net/manual/en/info.conf ... input-vars
Normally this value has 1.000 per default, increase it to 4.000 and see what's happen ..
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Thank you for your response.OSWorX wrote: ↑Thu Oct 17, 2024 5:12 pmGuess you should adopt the severs value of max_input_vars
See: https://www.php.net/manual/en/info.conf ... input-vars
Normally this value has 1.000 per default, increase it to 4.000 and see what's happen ..
I did put it already to 5000 . Saddly that also Is not helping
My hoster told me jus a few minutes ago its a timeout door HAProxy.
And now tells me to look if it is possible to let the shoppingcart go arround the database to solve the time out.
I thinks this will not be possible or... ??
As it is on a shared server they dont want to change anything to solve this (something to do with resources I think)
Did you optimize your database, index-wise?twdre wrote: ↑Thu Oct 17, 2024 5:34 pmThank you for your response.OSWorX wrote: ↑Thu Oct 17, 2024 5:12 pmGuess you should adopt the severs value of max_input_vars
See: https://www.php.net/manual/en/info.conf ... input-vars
Normally this value has 1.000 per default, increase it to 4.000 and see what's happen ..
I did put it already to 5000 . Saddly that also Is not helping
My hoster told me jus a few minutes ago its a timeout door HAProxy.
And now tells me to look if it is possible to let the shoppingcart go arround the database to solve the time out.
I thinks this will not be possible or... ??
As it is on a shared server they dont want to change anything to solve this (something to do with resources I think)
And of course, use a more dedicated webhosting plan, a simple shared hosting won't cut it.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Thank younonnedelectari wrote: ↑Thu Oct 17, 2024 5:48 pmDid you optimize your database, index-wise?twdre wrote: ↑Thu Oct 17, 2024 5:34 pmThank you for your response.OSWorX wrote: ↑Thu Oct 17, 2024 5:12 pmGuess you should adopt the severs value of max_input_vars
See: https://www.php.net/manual/en/info.conf ... input-vars
Normally this value has 1.000 per default, increase it to 4.000 and see what's happen ..
I did put it already to 5000 . Saddly that also Is not helping
My hoster told me jus a few minutes ago its a timeout door HAProxy.
And now tells me to look if it is possible to let the shoppingcart go arround the database to solve the time out.
I thinks this will not be possible or... ??
As it is on a shared server they dont want to change anything to solve this (something to do with resources I think)
Im now looking to this post if this could be the sollution: viewtopic.php?t=227675&hilit=memcached+db
Besides, OpenCart already uses a DB table for the shopping cart, namely the oc_cart, with a combined key using api_id,customer_id,session_id,product_id,recurring_id.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Yes, those will add the obvious basic indexes which should have been there by default.twdre wrote: ↑Thu Oct 17, 2024 6:04 pmThank younonnedelectari wrote: ↑Thu Oct 17, 2024 5:48 pmDid you optimize your database, index-wise?twdre wrote: ↑Thu Oct 17, 2024 5:34 pm
Thank you for your response.
I did put it already to 5000 . Saddly that also Is not helping
My hoster told me jus a few minutes ago its a timeout door HAProxy.
And now tells me to look if it is possible to let the shoppingcart go arround the database to solve the time out.
I thinks this will not be possible or... ??
As it is on a shared server they dont want to change anything to solve this (something to do with resources I think)
Im now looking to this post if this could be the sollution: viewtopic.php?t=227675&hilit=memcached+db
Yet, they may not be enough, you may have to use sql explain functions on the queries which are executed to see if more indexes (or less) are better.
Then again, maybe Neuhoff is correct, a shopping cart is not the right platform to order thousands of individual products (which poor soul inputs those?), maybe an API or batch process would be better.
OpenCart makes a lot of requests in the cart.
Take a look at my module, it will probably help you.
https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=45124
It would be good to know the answer to this so we can perhaps suggest another solution.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Its not so strange.paulfeakins wrote: ↑Thu Oct 17, 2024 9:51 pmIt would be good to know the answer to this so we can perhaps suggest another solution.
Customers are retail shops filling up their cart for some period or week (I dont know exactly how long they are doing this) . Depends what they are selling in their shop and at the end of their period they go to check out.
Thanx . I will give it a trysimple-opencart wrote: ↑Thu Oct 17, 2024 9:33 pmOpenCart makes a lot of requests in the cart.
Take a look at my module, it will probably help you.
https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=45124
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I see. Well OpenCart should easily be able to handle it, it sounds like a problem with your web host.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Thanx fiked it with you module together withsimple-opencart wrote: ↑Thu Oct 17, 2024 9:33 pmOpenCart makes a lot of requests in the cart.
Take a look at my module, it will probably help you.
https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=45124
https://www.opencart.com/index.php?rout ... n_id=41997
Site is flying till now. Hopefully it stays like this
Thanks to all of you who put me in the right direction
add the hash table:
Code: Select all
class DB {
private $adaptor;
// declare the hash table
private $hash_table = array();
Replace the query function with:
Code: Select all
public function query($sql, $cache = true) {
// remove tabs, linefeeds and spaces
$sql = str_replace("\t",' ',$sql);
$sql = str_replace("\r\n",' ',$sql);
$sql = str_replace("\n",' ',$sql);
$sql = preg_replace('/\s+/', ' ', $sql);
// use the hash table if so requested and the query does not contain inserts, updates, replacements or deletes
if ($cache && !preg_match('/(insert|update|replace|delete)/i', $sql, $matches)) {
// hash the query
$hash = hash('sha1',$sql);
// uncomment for tracing
//error_log('SQL Caching...: '.$sql);
// check if results are already in the hash table for this query
// if yes, use those results
// if no, perform the normal query and put the results in the hash table
if (!empty($this->hash_table[$hash])) {
// use the results from the hash table
$result = $this->hash_table[$hash];
// uncomment for tracing
//error_log('SQL hash found: '.$sql);
} else {
// perform a normal DB query
$result = $this->adaptor->query($sql);
// save the results in the hash table
$this->hash_table[$hash] = $result;
// uncomment for tracing
//error_log('SQL hash not found, hashing: '.$sql);
}
} else {
// uncomment for tracing
//error_log('SQL No Caching: '.$sql);
// perform the normal query
$result = $this->adaptor->query($sql);
}
return $result;
}
From the shopping cart thru to checkout, product related queries are very repetitive.
if "CartCacher" does something similar or better, go with that.
[/quote]
So please add [SOLVED] to the start of the post title.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Users browsing this forum: No registered users and 23 guests