phpMyAdmin 错误 504 网关超时重新加载

2024-04-09

我的 phpmyadmin 有一个非常烦人的问题。它出乎意料地出现。据我所知,我的专用服务器没有发生任何变化。

当我尝试在浏览器中执行任何查询或显示执行时间超过 1 秒的视图时(Windows 7 上的 firefox,即行为相同),我收到以下错误:

Error in Processing Request 
Error code: 504 
Error text: Gateway Timeout

查询可以或不需要有 count(*)。他们在 5m - 50m 行的表上工作。

有时,当我单击 phpmyadmin 中的任何链接(例如“浏览”、“服务器”或“结构”)时,会出现相同的错误。

php 脚本可以在同一个专用服务器上运行更密集的查询,可以完美地工作。

以下是一些技术细节:

Database server
•Server: Localhost via UNIX socket
•Server type: MySQL
•Server version: 5.5.38-0ubuntu0.14.04.1-log - (Ubuntu)
•Protocol version: 10
•User: XXX@localhost
• Server charset:  UTF-8 Unicode (utf8)  

Web server
•Apache/2.4.7 (Ubuntu)
•Database client version: libmysql - 5.5.38
•PHP extension: mysqli Documentation

phpMyAdmin
•Version information: 4.2.3deb1.trusty~ppa.1

我在网上跟踪了一些线索,尝试在 conf.inc.php 文件中添加最后两行(见下文),但在重新启动服务器后也没有任何更改:

<?php
/**
 * Debian local configuration file
 *
 * This file overrides the settings made by phpMyAdmin interactive setup
 * utility.
 *
 * For example configuration see
 *   /usr/share/doc/phpmyadmin/examples/config.sample.inc.php
 * or
 *   /usr/share/doc/phpmyadmin/examples/config.manyhosts.inc.php
 *
 * NOTE: do not add security sensitive data to this file (like passwords)
 * unless you really know what you're doing. If you do, any user that can
 * run PHP or CGI on your webserver will be able to read them. If you still
 * want to do this, make sure to properly secure the access to this file
 * (also on the filesystem level).
 */

// Load secret generated on postinst
include('/var/lib/phpmyadmin/blowfish_secret.inc.php');

// Load autoconf local config
include('/var/lib/phpmyadmin/config.inc.php');

/**
 * Server(s) configuration
 */
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;

/**
 * Read configuration from dbconfig-common
 * You can regenerate it using: dpkg-reconfigure -plow phpmyadmin
 */
if (is_readable('/etc/phpmyadmin/config-db.php')) {
    require('/etc/phpmyadmin/config-db.php');
} else {
    error_log('phpmyadmin: Failed to load /etc/phpmyadmin/config-db.php.'
        . ' Check group www-data has read access.');
}

/* Configure according to dbconfig-common if enabled */
if (!empty($dbname)) {
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    if (empty($dbserver)) $dbserver = 'localhost';
    $cfg['Servers'][$i]['host'] = $dbserver;

    if (!empty($dbport) || $dbserver != 'localhost') {
        $cfg['Servers'][$i]['connect_type'] = 'tcp';
        $cfg['Servers'][$i]['port'] = $dbport;
    }
    //$cfg['Servers'][$i]['compress'] = false;
    /* Select mysqli if your server has it */
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    /* Optional: User for advanced features */
    $cfg['Servers'][$i]['controluser'] = $dbuser;
    $cfg['Servers'][$i]['controlpass'] = $dbpass;
    /* Optional: Advanced phpMyAdmin features */
    $cfg['Servers'][$i]['pmadb'] = $dbname;
    $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma_relation';
    $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
    $cfg['Servers'][$i]['history'] = 'pma_history';
    $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
    $cfg['Servers'][$i]['tracking'] = 'pma_tracking';
    $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

    /* Uncomment the following to enable logging in to passwordless accounts,
     * after taking note of the associated security risks. */
    // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

    /* Advance to next server for rest of config */
    $i++;
}

/* Authentication type */
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
//$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
//$cfg['Servers'][$i]['extension'] = 'mysql';
/* Optional: User for advanced features */
 //$cfg['Servers'][$i]['controluser'] = 'pma';
 //$cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Optional: Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma_relation';
// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
// $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
/* Uncomment the following to enable logging in to passwordless accounts,
 * after taking note of the associated security risks. */
// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

//$cfg['AllowArbitraryServer'] = true;
$cfg['LoginCookieValidity'] = 86400;
$cfg['MaxExactCount'] = 0;
$cfg['MaxExactCountViews'] = 0;

请帮我。


我将以下行添加到文件 /etc/nginx/nginx.conf 的 http{} 块中:

  • fastcgi_read_timeout 360;

重启nginx

  • sudo 服务 nginx 重新启动

祝你好运!!!记得喜欢我哦。非常感谢!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

phpMyAdmin 错误 504 网关超时重新加载 的相关文章

随机推荐

  • 使用rest-client 将文件下载到磁盘,而不先将其全部加载到内存中

    我正在使用 Rest client 下载大页面 大小约为 1 5 GB 检索到的值存储在内存中 而不是保存到文件中 结果我的程序崩溃了failed to allocate memory NoMemoryError 但没有必要将这些数据保存在
  • R:如何从 R 包中的 inst/extdata 延迟加载变量

    我的 inst extdata 中有一个文件 helper RData 文件 其中包含 我的包中的函数要使用的变量和数据集 但不意味着用户可以访问 我使用以下方法将其加载到包的开头 load system file extdata help
  • 在实现特征时如何明确指定生命周期?

    鉴于下面的实现 基本上我有一些可以通过 i32 id 字段或字符串字段查找的项目集合 为了能够互换使用 使用了特征 IntoKey 并且match分派到适当的查找映射 这一切都适合我的定义get内MapCollection impl use
  • React 16.8.6 对应的测试库/react 版本是什么?

    我正在尝试制作一个打字稿前端 但我无法使用react dom client导入是因为我已经缩小到我的测试库 反应版本与我的反应版本不对应的问题 我已经尝试了多个降级版本 但似乎无法让它工作 有什么解决办法吗 我会附上我的package js
  • 将请求传递给特定的分叉节点实例

    如果我错了 请纠正我 但不可能在同一端口上启动多个 http 服务器 基于此 有趣的是 NodeJS 集群可能会分叉 因为我知道有一个主人正在将请求传递给其中一个分叉工人 什么worker是由操作系统管理的或者cluster schedul
  • Amazon SES 停止工作

    我设置了 Amazon SES 它最初运行了几个小时 然后突然停止了 我发送的所有电子邮件以及我们的域都已经过验证 我们不会发送大量电子邮件 每天只发送几百封 每当我对 web config 进行更改时 它似乎又可以再工作 2 3 小时 例
  • Rails 3 link_to (:method => :delete) 不起作用

    我有Rails 中的动词有问题 查看资源 狗 的页面 该资源有很多 跳蚤 嵌入狗体内show html haml是一个电话render dog fleas它会自动 找到并使用 fleas flea html haml 中的模板来列出与所述狗
  • 单遍读取和验证 XML 与 C# 中引用的 XSD

    我正在尝试从 XML 文件中读取数据 并根据它建议的 XSD 对其进行验证 将其转换为单个数据结构 例如 XmlDocument 我有一个解决方案 但它需要两次通过文件 我想知道是否有单次解决方案 MyBooks xml
  • 如何在 PHP 中将数字格式化为美元金额

    如何将数字转换为显示美元和美分的字符串 eg 123 45 gt 123 45 123 456 gt 123 46 123 gt 123 00 13 gt 0 13 1 gt 0 10 0 gt 0 00 如果你只想要简单的东西 numbe
  • 如何在 Windows 命令行上以合适的格式获取当前日期/时间以在文件/文件夹名称中使用?

    更新 现在已经是 2016 年了 我会使用 PowerShell 来实现此目的 除非有真正令人信服的向后兼容的原因 特别是因为使用的区域设置问题date 请参阅 npocmaka 的https stackoverflow com a 197
  • Android 上的 pthread_create 警告

    打电话后pthread create函数我收到下一条消息 W libc 26409 pthread create sched setscheduler 调用失败 不允许操作 用于创建线程的代码是 pthread attr t threadA
  • 防止单个单词在 css/html 中环绕浮动

    有没有什么方法可以防止一个或两个单词环绕浮动 但如果有更多文本则允许它 这是一个示例 其中第一个文本有问题 但第二个文本很好 http jsfiddle net wdPCp http jsfiddle net wdPCp div class
  • AllowAnonymous 不适用于 Azure 广告身份验证

    我有一个 Asp net MVC 应用程序 在其中使用 Azure AD 身份验证来对用户进行身份验证 我想允许用户无需登录即可访问某些 api 控制器 我尝试将 AllowAnonymous 属性放在控制器顶部以跳过这些控制器进行身份验证
  • 无法杀死的控制台窗口

    我正在 Visual C 2008 下使用 GLUT 开发基于 OpenGL 的 2d 模拟 有时当我遇到断言 或未处理的异常并闯入调试器时 GLUT 显示窗口关闭 但控制台窗口保持打开状态 它们只是不能杀了 它们不会出现在任务管理器 进程
  • 计算的属性不会在 Powershell 中引发异常。有哪些解决办法?

    显然有一个通过设计怪癖 https connect microsoft com PowerShell feedback details 782806 calculated properties do not throw exceptions
  • 使用 Firefox 打开确认对话框时显示“$apply already in Progress”

    我 有时 变得很奇怪 申请已在进行中在以下看似无辜的情况下打开确认对话框时出错 var mod angular module app mod controller ctrl function scope interval http scop
  • 如何知道ngOnChanges中哪些@Input发生了变化?

    我正在使用 Angular 2 现在我有两个 inputaa and bb 我想要做 If aa改变 做某事 If bb改变 做其他事情 如何知道哪些 Input发生了变化ngOnChanges Thanks Input aa Input
  • 分析心率监测器返回的数据

    我正在尝试通过蓝牙读取心率监视器传输的数据 但我真的不知道如何读取心率监视器返回的字节 每个供应商可能都有自己的将数据包装成字节的方法 但是如何将这些字节转换为某种可读格式 以便我可以分析其中的变化 例如 ASCII 值或某些十六进制值 我
  • 如何调试特定的 JavaScript 点击事件?

    在雅虎天气页面上 有一个链接标记为C改变温度单位Fahrenheit to Celsius 我正在寻找调试此操作并了解 JavaScript 在幕后执行的内容 将 F 转换为 C 调试此类操作的方法是什么 Link http weather
  • phpMyAdmin 错误 504 网关超时重新加载

    我的 phpmyadmin 有一个非常烦人的问题 它出乎意料地出现 据我所知 我的专用服务器没有发生任何变化 当我尝试在浏览器中执行任何查询或显示执行时间超过 1 秒的视图时 Windows 7 上的 firefox 即行为相同 我收到以下