php - WooCommerce 的持续 504 超时

标签 php wordpress apache ssl woocommerce

尝试更新 Wordpress 中的帖子、设置或其他数据时,我一直收到 504“网关超时”错误。这是在共享的 NetworkSolutions 主机上,Network Solutions 支持人员告诉我:

These errors occur when the SSL Proxy tier "Times out" waiting for code on your hosting package to execute or load. Our SSL Proxy admins are not able to raise the timeout settings on the proxy server without negatively impacting performance globally. The only solutions are to not use an SSL on your site, or to optimize your code. If your code is able to complete loading server-side and be delivered to a client machine in under 30 seconds, the timeouts will not occur on your site(s). For example, your site has 30 .CSS files and 38 .JS files. There should be less than 10 of each on an optimized site, and having more will increase the chance of the SSL proxy timing out waiting for these to be called, downloaded, and rendered.

我已经尝试在 php.ini 中设置 max_execution_time = 1600memory_limit = 128M。如果我在 Wordpress 管理员中强制使用 https,或者只使用 http,这似乎并不重要。

我们有一个相当复杂的 Wordpress 安装(请参阅下面的插件列表),除了 WooCommerce 之外还有我们自己的自定义帖子类型。我们正在使用 Storefront 子主题。

我的问题:

  • 是否有一种好方法可以找出导致超时的确切原因?
  • 简化我的主题(本质上是构建我们自己的父主题,而不是通过子主题修改 Storefront)是否会提高性能?
  • 我真的只需要探索替代托管环境吗?

--

以下是 WooCommerce 的其他系统详细信息:

WC Version: 2.6.3
WP Version: 4.5.3
WP Memory Limit: 256 MB

服务器信息:Apache

PHP Version: 7.0.2-pl0-gentoo
PHP Post Max Size: 50 MB
PHP Time Limit: 1600
PHP Max Input Vars: 1000
cURL Version: 7.39.0
OpenSSL/1.0.1r

Max Upload Size: 50 MB
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

数据库

WC Database Version: 2.6.3
woocommerce_sessions: ✔
woocommerce_api_keys: ✔
woocommerce_attribute_taxonomies: ✔
woocommerce_downloadable_product_permissions: ✔
woocommerce_order_items: ✔
woocommerce_order_itemmeta: ✔
woocommerce_tax_rates: ✔
woocommerce_tax_rate_locations: ✔
woocommerce_shipping_zones: ✔
woocommerce_shipping_zone_locations: ✔
woocommerce_shipping_zone_methods: ✔
woocommerce_payment_tokens: ✔
woocommerce_payment_tokenmeta: ✔
MaxMind GeoIP Database: ✔

活跃插件 (31)

  • 高级自定义字段专业版:由 elliot condon – 5.2.7
  • Akismet:Automattic – 3.1.11
  • Breadcrumb NavXT:John Havlik – 5.4.0
  • 联系表 7:Takayuki Miyoshi – 4.4.2
  • Disqus 评论系统:Disqus – 2.85
  • 启用媒体替换:Måns Jonasson – 3.0.4
  • 增强媒体库:wpUXsolutions – 2.3
  • Google XML 站点地图:Arne Brachhold – 4.0.8
  • 成员:Justin Tadlock – 1.1.2
  • 菜单导出器:Joe Hoyle - Human Made Limited – 1
  • PDF 图像生成器:Mizuho Ogino – 1.4.6.5
  • 公开发布预览:Dominik Schilling – 2.5.0
  • 重定向:John Godley – 2.4.5
  • 删除修订后优化数据库:CAGE Web Design | Rolf van Gelder 荷兰埃因霍温 – 4.1.10
  • 说什么?:Lee Willis – 1.7.1
  • W3 总缓存:Frederick Townes – 0.9.4.1
  • WooCommerce Authorize.net 报告:WooThemes/SkyVerge – 1.5.0
  • WooCommerce 结帐字段编辑器:WooThemes – 1.4.10
  • WooCommerce 客户/订单 CSV 导出:WooThemes/SkyVerge – 3.12.1
  • WooCommerce Authorize.net CIM 网关:WooThemes/SkyVerge – 2.3.0
  • WooCommerce Google Analytics 集成:WooThemes – 1.4.0
  • WooCommerce MailChimp 集成:WooThemes – 1.0.0
  • WooCommerce 命名您的价格:Kathy Darling – 2.3.4
  • WooCommerce 产品附加组件:WooThemes – 2.7.21
  • WooCommerce 顺序订单号专业版:WooThemes/SkyVerge – 1.10.0
  • WooCommerce 社交登录:WooThemes/SkyVerge – 1.8.0
  • WooCommerce:WooThemes – 2.6.3
  • WooThemes 助手:WooThemes – 1.6.2
  • WP 用户头像:由 flippercode – 2.0.7
  • wpMandrill:Mandrill – 1.33

最佳答案

关闭 WP-SMTP 也对我有用。使用 WoocCommerce v3.0。虽然这可能是个误会。我在这种情况下修复的错误是基于购物车的错误,而不是服务器错误。

更新:根据 WP-SMTP 网站上的建议更改了 SMTP 设置。现在一切正常。

关于php - WooCommerce 的持续 504 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38531633/

相关文章:

apache - 在Htaccess中在Mod_rewrite之前运行ErrorDocument

php - 如何删除 symfony2 中的 Session 和 cookie

php - Doctrine 2 : selecting entity fields, 包括相关字段

PHP 显示 json 结果的问题

html - 样式化 Wordpress 插件复选框

wordpress - 如何删除?使用 htaccess 从 url

java - 处理同时连接的 NanoHTTPD 的替代方案?

php - MySQL Decimal 不返回结果

wordpress - 将媒体文件从外部 URL 上传到 WordPress 媒体库

mysql - 将一个数据库字段的值合并到另一个数据库字段中