Jump to content

Slow TTFB after Payment Confirmation (All Payment Modules)


Recommended Posts

I'm posting here because we've now been trouble shooting this issue for 20 hrs +.  I realize that whichever options are presented i.e., the theme maker, the prestashop package or the server software, inevitably each will blame the other so I'm going to skip that and layout the issue here in the hopes of receiving some awesome ideas and potential solutions.

 

We recently upgraded to Prestashop v1.6.0.14 from v1.6.0.6 which required us to do the same with the theme.  We have a dedicated server, and some updates were also applied recently which caused issues but were finally resolved.

 

We originally had the Cash on Delivery module installed and working just fine along with a Custom Payment Module which simply took the CC info and securely split the data for manual processing.   Neither of these payment modules were connected to merchant services.

 

At some point within the last week something changed or who knows, but when checking out everything goes great on both modules until you click the "confirm order" button.  From that point it takes exactly 70 seconds for the TTFB.  It happens exactly the same for both payment modules.

 

Just to make sure, we uninstalled both modules and tried 2 different modules with the same results.  Now, once the "confirm order" button is selected a confirmation email is immediately dispatched which tells us that it's doing that much.  Also, if I click the "confirm order" button a second time immediately after instead of waiting the 70 seconds, it immediately flips me to a notification stating “Cart cannot be loaded or an order has already been placed using this cart”.  Either way, the payment is always recorded properly in the system under the proper user account.

 

I've setup the debug mode but receive no errors.  I've checked the error_log file located in the home directory, but there are no references to this issue.  I've gone through the file thoroughly and can account for each error that has been logged.

 

Additionally, we've modified the php.ini file and expanded a few variables which are listed below.  Per the prestashop requirements we've also enabled PHP Version 5.4.40 and mem_cache.

 

I’ve uninstalled all prestashop modules front and back that are not in use.  I’ve also included .htaccess entries which are below as well.  Keep in mind that everything worked fine as of a few days ago and now this payment option has got us baffled.

 

We also have a module called “Advanced URL” loaded, but have tested this process with and without the module installed and reached the same conclusion. 

Before you ask, Yes we had all cache features disabled upon testing and properly cleared all compiled and cached files on the server and within our local web browsers and tested this from multiple networks and browsers while reaching the same results.

 

We also deleted the original payment modules from the system, cleared out all cache and connected the shop directly to Prestashop to re-download and install these modules for a second test.

 

Other than this payment module issue, all other bugs have been fixed.  If you have any ideas we would greatly appreciate your input.  Thank you guys.

 

 

PHP.INI ENTRIES:

max_execution_time = 3000     ; 

max_input_time = 3000    ; 

memory_limit = 2048M      ; 

max_input_vars = 10000    ; 

suhosin.get.max_vars = 10000    ;

suhosin.post.max_vars = 10000    ;

 

HTACCESS FILE:

<IfModule mod_rewrite.c>

<IfModule mod_env.c>

SetEnv HTTP_MOD_REWRITE On

</IfModule>

 

RewriteEngine on

 

 

#Domain: www.yoursite.com

RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^api$ api/ [L]

 

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

 

# Images

RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]

RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]

RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]

RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]

# AlphaImageLoader for IE and fancybox

RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

 

# Dispatcher

RewriteCond %{REQUEST_FILENAME} -s [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]

</IfModule>

 

AddType application/vnd.ms-fontobject .eot

AddType font/ttf .ttf

AddType font/otf .otf

AddType application/x-font-woff .woff

<IfModule mod_headers.c>

                <FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">

                                Header add Access-Control-Allow-Origin "*"

                </FilesMatch>

</IfModule>

 

<IfModule mod_expires.c>

                ExpiresActive On

                ExpiresByType image/gif "access plus 1 month"

                ExpiresByType image/jpeg "access plus 1 month"

                ExpiresByType image/png "access plus 1 month"

                ExpiresByType text/css "access plus 1 week"

                ExpiresByType text/javascript "access plus 1 week"

                ExpiresByType application/javascript "access plus 1 week"

                ExpiresByType application/x-javascript "access plus 1 week"

                ExpiresByType image/x-icon "access plus 1 year"

                ExpiresByType image/svg+xml "access plus 1 year"

                ExpiresByType image/vnd.microsoft.icon "access plus 1 year"

                ExpiresByType application/font-woff "access plus 1 year"

                ExpiresByType application/x-font-woff "access plus 1 year"

                ExpiresByType application/vnd.ms-fontobject "access plus 1 year"

                ExpiresByType font/opentype "access plus 1 year"

                ExpiresByType font/ttf "access plus 1 year"

                ExpiresByType font/otf "access plus 1 year"

                ExpiresByType application/x-font-ttf "access plus 1 year"

                ExpiresByType application/x-font-otf "access plus 1 year"

</IfModule>

 

<IfModule mod_headers.c>

                Header unset Etag

</IfModule>

FileETag none

<IfModule mod_deflate.c>

                <IfModule mod_filter.c>

                                AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype

                </IfModule>

</IfModule>

 

#If rewrite mod isn't enabled

ErrorDocument 404 /index.php?controller=404

 

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf|pdf|flv|mp3)$"> <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 14 days" Header set Cache-Control "public" </IfModule> </FilesMatch> <FilesMatch "\.(html|htm|xml|txt|xsl)$"> Header set Cache-Control "max-age=7200, must-revalidate" </FilesMatch>

 

 

<IfModule mod_mime.c>

AddType application/x-javascript .js

AddType text/css .css

</IfModule>

<IfModule mod_deflate.c>

AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/javascript

<IfModule mod_setenvif.c>

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4\.0[678] no-gzip

BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

</IfModule>

<IfModule mod_headers.c>

Header append Vary User-Agent env=!dont-vary

</IfModule>

</IfModule>

 

SetOutputFilter DEFLATE

<IfModule mod_setenvif.c>

SetEnvIfNoCase Request_URI \.(?:rar|zip)$ no-gzip dont-vary

SetEnvIfNoCase Request_URI \.(?:gif|jpg|png)$ no-gzip dont-vary

SetEnvIfNoCase Request_URI \.(?:avi|mov|mp4)$ no-gzip dont-vary

SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary

</IfModule>

post-865259-0-99803900-1434937563_thumb.png

Link to comment
Share on other sites

×
×
  • Create New...