Forum

Thread tagged as: Hosting, Shop

Server Response Time

Hi,

I've set up Perch Shop and the server response time seems to be super slow (minimum of 1.5 seconds). I've been in touch with the host and they have seen no problems their end so I'm wondering if there's anything I can do with Perch to speed things up? Below is my diagnostics.


Perch: 3.0.14 Production mode: Production (100) Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_blog (5.6.1), perch_shop_orders (1.2.5), perch_shop_products (1.2.5), perch_shop (1.2.5), perch_members (1.6.2) DB driver: PDO DB tables: perch3_blog_authors (1), perch3_blog_comments (0), perch3_blog_index (132), perch3_blog_posts (3), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blog_webmention_queue (0), perch3_blogs (1), perch3_categories (2), perch3_category_counts (0), perch3_category_sets (2), perch3_content_index (1840), perch3_content_items (106), perch3_content_regions (21), perch3_members (5), perch3_members_forms (2), perch3_members_member_tags (0), perch3_members_sessions (1), perch3_members_tags (2), perch3_menu_items (13), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (1), perch3_pages (15), perch3_resource_log (1020), perch3_resource_tags (0), perch3_resources (379), perch3_resources_to_tags (0), perch3_settings (41), perch3_shop_addresses (62), perch3_shop_admin_index (122), perch3_shop_brands (1), perch3_shop_cart (37036), perch3_shop_cart_data (79), perch3_shop_cart_items (24), perch3_shop_countries (250), perch3_shop_currencies (152), perch3_shop_customers (8), perch3_shop_emails (2), perch3_shop_index (797), perch3_shop_option_values (0), perch3_shop_options (0), perch3_shop_order_items (24), perch3_shop_order_promotions (0), perch3_shop_order_statuses (9), perch3_shop_orders (12), perch3_shop_orders_meta (1), perch3_shop_product_files (0), perch3_shop_product_option_values (0), perch3_shop_product_options (0), perch3_shop_product_tags (0), perch3_shop_products (16), perch3_shop_promotions (0), perch3_shop_sales (0), perch3_shop_search (16), perch3_shop_shipping_zone_countries (1), perch3_shop_shipping_zones (1), perch3_shop_shippings (4), perch3_shop_tax_exhibits (24), perch3_shop_tax_group_rates (1), perch3_shop_tax_groups (1), perch3_shop_tax_locations (1), perch3_shop_tax_rates (1), perch3_shop_variants (0), perch3_user_passwords (1), perch3_user_privileges (76), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1) Users: 1 App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_members', 'perch_shop', ]; Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins) Editor plug-ins: H1: db33dca29a7603f9def607b3b42078f8 L1: 89628fba18b92a489a843f44574a757b F1: 3b606135b33e6a102526838f4152a807 headerColour: #ffffff content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 1 content_collapseList: 1 lang: en-gb installedAt: 3.0.12 update_3.0.12: done latest_version: on_sale_version: perch_shop_update: 1.2.5 headerScheme: light perch_shop_price_tax_mode: inc perch_shop_site_url: https://www.designeroutdoorlighting.co.uk perch_shop_product_url: product/{slug} perch_shop_default_currency: 47 perch_shop_reporting_currency: 47 perch_shop_invoice_number_format: Invoice%d perch_members_login_page: login.php?r={returnURL} perch_blog_site_name: perch_blog_post_url: post.php?s={postSlug} perch_blog_slug_format: %Y-%m-%d-{postTitle} perch_blog_akismet_key: perch_blog_max_spam_days: 0 dashboard: 1 sidebar_back_link: 0 hide_pwd_reset: 0 keyboardShortcuts: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 content_skip_region_list: 0 assets_restrict_buckets: 0 perch_blog_comment_notify: 0 perch_blog_webmention_tx: 0 perch_blog_webmention_rx: 0 perch_blog_update: 5.6 perch_members_update: 1.4 logoPath: /files/logo2x.png update_3.0.14: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: designerlighting PERCH_DB_SERVER: 213.171.200.97 PERCH_DB_DATABASE: outdoorlighting PERCH_DB_PREFIX: perch3_ PERCH_TZ: UTC PERCH_EMAIL_FROM: jade@picseli.co.uk PERCH_EMAIL_FROM_NAME: Jade Marling PERCH_LOGINPATH: /admin PERCH_PATH: /home/hp3-linc4-nfs1-w/935/1669935/user/htdocs/admin PERCH_CORE: /home/hp3-linc4-nfs1-w/935/1669935/user/htdocs/admin/core PERCH_RESFILEPATH: /home/hp3-linc4-nfs1-w/935/1669935/user/htdocs/files PERCH_RESPATH: /files PERCH_HTML5: 1 PERCH_RUNWAY: PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_RUNWAY_ROUTED: PERCH_STRONG_PASSWORDS: PERCH_ASSET_VERSION: f704e7442d11292c99b5 PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /home/hp3-linc4-nfs1-w/935/1669935/user/htdocs/admin/templates PERCH_TEMPLATE_FILTERS: PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_XHTML_MARKUP: PERCH_RWD: 1 PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_PARANOID: PERCH_FORCE_SECURE_COOKIES: PERCH_DEFAULT_BUCKET: default PERCH_TRANSLATION_ASSIST: PERCH_PASSWORD_MIN_LENGTH: 6 PERCH_MAX_FAILED_LOGINS: 10 PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR PERCH_VERIFY_UPLOADS: PERCH_PRIV_ASSIST: PERCH_CUSTOM_EDITOR_CONFIGS: PERCH_ENABLE_EXIF: 1 PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: PERCH_SHOP_VERSION: 1.2.5 PERCH_APPS_EDITOR_PLUGIN: markitup PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown Hosting settings PHP: 7.0.30 Zend: 3.0.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: 5.5.56-MariaDB MySQL server: 5.6.40-log Free disk space: 85.37 GB Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, fileinfo, filter, ftp, gettext, gmp, SPL, iconv, intl, pcntl, session, standard, posix, readline, Reflection, Phar, shmop, SimpleXML, sockets, mbstring, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, cgi-fcgi, bcmath, dba, dom, gd, imap, json, ldap, exif, mcrypt, memcached, mysqli, odbc, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, pspell, snmp, soap, tidy, xmlreader, xmlrpc, xmlwriter, xsl, zip GD: Yes ImageMagick: No PHP max upload size: 20M PHP max form post size: 20M PHP memory limit: 128M Total max uploadable file size: 20M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PWD: /var/www/fcgi PHP_FCGI_MAX_REQUESTS: 100 ORIG_SCRIPT_NAME: /fcgi-bin/php70-cgi ORIG_PATH_TRANSLATED: /home/hp3-linc4-nfs1-w/935/1669935/user/htdocs/admin/core/settings/diagnostics/index.php ORIG_PATH_INFO: /admin/core/settings/diagnostics/index.php ORIG_SCRIPT_FILENAME: /var/www/fcgi/php70-cgi SCRIPT_NAME: /admin/core/settings/diagnostics/index.php REQUEST_URI: /admin/core/settings/diagnostics/?extended QUERY_STRING: extended REQUEST_METHOD: GET SERVER_PROTOCOL: HTTP/1.0 GATEWAY_INTERFACE: CGI/1.1 REDIRECT_URL: /admin/core/settings/diagnostics/index.php REDIRECT_QUERY_STRING: extended REMOTE_PORT: 49632 SCRIPT_FILENAME: /home/hp3-linc4-nfs1-w/935/1669935/user/htdocs/admin/core/settings/diagnostics/index.php SERVER_ADMIN: admin@designeroutdoorlighting.co.uk CONTEXT_DOCUMENT_ROOT: /var/www/fcgi/ CONTEXT_PREFIX: /fcgi-bin/ REQUEST_SCHEME: https DOCUMENT_ROOT: /home/hp3-linc4-nfs1-w/935/1669935/user/htdocs REMOTE_ADDR: 91.103.188.194 SERVER_PORT: 443 SERVER_ADDR: 10.10.110.3 SERVER_NAME: www.designeroutdoorlighting.co.uk SERVER_SOFTWARE: Apache HTTP_UPGRADE_INSECURE_REQUESTS: 1 HTTP_COOKIE: cmsa=1; _ga=GA1.3.1084902834.1520267280; PHPSESSID=dhngi2vh9qlf0gbnknfusacp02; _gid=GA1.3.261658636.1526033871 HTTP_REFERER: https://www.designeroutdoorlighting.co.uk/admin/core/settings/diagnostics/ HTTP_ACCEPT_ENCODING: gzip, deflate, br HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5 HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 HTTP_CONNECTION: close HTTP_X_URL_SCHEME: https HTTP_X_FORWARDED_PROTO: https HTTP_X_REAL_IP: 91.103.188.194 HTTP_X_FORWARDED_HOST: www.designeroutdoorlighting.co.uk HTTP_HOST: www.designeroutdoorlighting.co.uk SSL_SESSION_RESUMED: Resumed SSL_SESSION_ID: 3d9f887943903331fbc972f89db273b2cc05f52d6fa928efaa027a4bcff3aea9 SSL_SERVER_A_SIG: sha1WithRSAEncryption SSL_SERVER_A_KEY: rsaEncryption SSL_SERVER_I_DN: CN=clusteredwebhosting.hostingp3.local,L=Gloucester,ST=Gloucestershire,OU=NOC,O=Fasthosts Internet Limited,C=GB SSL_SERVER_S_DN: CN=clusteredwebhosting.hostingp3.local,L=Gloucester,ST=Gloucestershire,OU=NOC,O=Fasthosts Internet Limited,C=GB SSL_SERVER_V_END: Jun 13 09:57:55 2018 GMT SSL_SERVER_V_START: Aug 24 09:57:55 2015 GMT SSL_SERVER_M_SERIAL: 82B49DAED9E06E64 SSL_SERVER_M_VERSION: 1 SSL_CLIENT_VERIFY: NONE SSL_CIPHER_ALGKEYSIZE: 256 SSL_CIPHER_USEKEYSIZE: 256 SSL_CIPHER_EXPORT: false SSL_CIPHER: ECDHE-RSA-AES256-GCM-SHA384 SSL_COMPRESS_METHOD: NULL SSL_SECURE_RENEG: true SSL_PROTOCOL: TLSv1.2 SSL_VERSION_LIBRARY: OpenSSL/1.0.2k-fips SSL_VERSION_INTERFACE: mod_ssl/2.4.6 SSL_SERVER_I_DN_CN: clusteredwebhosting.hostingp3.local SSL_SERVER_I_DN_L: Gloucester SSL_SERVER_I_DN_ST: Gloucestershire SSL_SERVER_I_DN_OU: NOC SSL_SERVER_I_DN_O: Fasthosts Internet Limited SSL_SERVER_I_DN_C: GB SSL_SERVER_S_DN_CN: clusteredwebhosting.hostingp3.local SSL_SERVER_S_DN_L: Gloucester SSL_SERVER_S_DN_ST: Gloucestershire SSL_SERVER_S_DN_OU: NOC SSL_SERVER_S_DN_O: Fasthosts Internet Limited SSL_SERVER_S_DN_C: GB HTTPS: on UNIQUE_ID: WvV1cjO6GsJKN7nWjvlRBwAAAB8 REDIRECT_STATUS: 200 REDIRECT_HANDLER: application/x-httpd-php70 REDIRECT_SSL_SESSION_RESUMED: Resumed REDIRECT_SSL_SESSION_ID: 3d9f887943903331fbc972f89db273b2cc05f52d6fa928efaa027a4bcff3aea9 REDIRECT_SSL_SERVER_A_SIG: sha1WithRSAEncryption REDIRECT_SSL_SERVER_A_KEY: rsaEncryption REDIRECT_SSL_SERVER_I_DN: CN=clusteredwebhosting.hostingp3.local,L=Gloucester,ST=Gloucestershire,OU=NOC,O=Fasthosts Internet Limited,C=GB REDIRECT_SSL_SERVER_S_DN: CN=clusteredwebhosting.hostingp3.local,L=Gloucester,ST=Gloucestershire,OU=NOC,O=Fasthosts Internet Limited,C=GB REDIRECT_SSL_SERVER_V_END: Jun 13 09:57:55 2018 GMT REDIRECT_SSL_SERVER_V_START: Aug 24 09:57:55 2015 GMT REDIRECT_SSL_SERVER_M_SERIAL: 82B49DAED9E06E64 REDIRECT_SSL_SERVER_M_VERSION: 1 REDIRECT_SSL_CLIENT_VERIFY: NONE REDIRECT_SSL_CIPHER_ALGKEYSIZE: 256 REDIRECT_SSL_CIPHER_USEKEYSIZE: 256 REDIRECT_SSL_CIPHER_EXPORT: false REDIRECT_SSL_CIPHER: ECDHE-RSA-AES256-GCM-SHA384 REDIRECT_SSL_COMPRESS_METHOD: NULL REDIRECT_SSL_SECURE_RENEG: true REDIRECT_SSL_PROTOCOL: TLSv1.2 REDIRECT_SSL_VERSION_LIBRARY: OpenSSL/1.0.2k-fips REDIRECT_SSL_VERSION_INTERFACE: mod_ssl/2.4.6 REDIRECT_SSL_SERVER_I_DN_CN: clusteredwebhosting.hostingp3.local REDIRECT_SSL_SERVER_I_DN_L: Gloucester REDIRECT_SSL_SERVER_I_DN_ST: Gloucestershire REDIRECT_SSL_SERVER_I_DN_OU: NOC REDIRECT_SSL_SERVER_I_DN_O: Fasthosts Internet Limited REDIRECT_SSL_SERVER_I_DN_C: GB REDIRECT_SSL_SERVER_S_DN_CN: clusteredwebhosting.hostingp3.local REDIRECT_SSL_SERVER_S_DN_L: Gloucester REDIRECT_SSL_SERVER_S_DN_ST: Gloucestershire REDIRECT_SSL_SERVER_S_DN_OU: NOC REDIRECT_SSL_SERVER_S_DN_O: Fasthosts Internet Limited REDIRECT_SSL_SERVER_S_DN_C: GB REDIRECT_HTTPS: on REDIRECT_UNIQUE_ID: WvV1cjO6GsJKN7nWjvlRBwAAAB8 FCGI_ROLE: RESPONDER PHP_SELF: /admin/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1526035826.9948 REQUEST_TIME: 1526035826

Anty help would mucly appreciated! Thank you in advanced

Jade Marling

Jade Marling 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You seem to have 37,000 carts. Is that expected?

37,000? No that's not expected. How can this be resolved?

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you look in your perch3_shop_cart table, what do the carts look like? are they pretty much all zero?

Yes they are

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using cart functions on pages that don't need them but get a lot of traffic?

The cart feautres in the navigation, so yes it appears on every page. If I remove it so it's only on the shop will that resolve the issue?

Am i able to delete the carts that are zero from the database?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You're creating a new cart for every site visitor.

I'd start by deleting the empty carts from the database table and seeing if that helps the page load time.

How do I prevent this from happening? The code to my cart in the navigation is below


<!-- shopping cart start --> <div class="cart link-inline"> <div class="dropdown text-right"> <a class="dropdown-toggle "> <perch:if id="product_count" match="gt" value="0"> <perch:form id="cart" app="perch_shop"> <span class="badge badge--cart"><perch:shop id="item_count" /></span> <span class="icon icon-shopping_basket"></span> <span class="name-text">My Cart</span> </a> <div class="dropdown-menu dropdown-menu--xs-full slide-from-top" role="menu"> <div class="container"> <div class="cart__top">Recently added item(s)</div> <a href="#" class="icon icon-close cart__close"><span>CLOSE</span></a> <ul> <perch:cartitems> <li class="cart__item"> <div class="cart__item__image pull-left"><a href="product/<perch:cartitem id="slug"/>"><img src="<perch:cartitem id="image" type="image" width="80" height="80" density="1.6" crop="true"/>" alt=""/></a></div> <div class="cart__item__control"> <div class="cart__item__delete"><a href="#" class="icon icon-delete"><span>Delete</span></a></div> </div> <div class="cart__item__info"> <div class="cart__item__info__title"> <h2><a href="product/<perch:cartitem id="slug"/>"><perch:cartitem id="title" /></a></h2> </div> <div class="cart__item__info__price"><span class="info-label">Price:</span><perch:cartitem id="total_without_tax_formatted" /></div> <div class="cart__item__info__qty"><span class="info-label">Qty:</span><perch:cartitem id="quantity" /></div> </div> </li> </perch:cartitems> </ul> <div class="cart__bottom"> <div class="cart__total">Cart subtotal: <span> <perch:shop id="total_items_discounted_formatted" /></span></div> <a href="checkout.php" class="btn btn--ys btn-checkout">Checkout <span class="icon icon--flippedX icon-reply"></span></a> <a href="cart.php" class="btn btn--ys"><span class="icon icon-shopping_basket"></span> View Cart</a> </div> </div> </div> </div> </div> <!-- shopping cart end -->
Drew McLellan

Drew McLellan 2638 points
Perch Support

Did removing the carts help? There's not point troubleshooting until we've identified the problem.