質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

MediaWiki

MediaWikiは、Wikipediaを運営するウィキメディア財団が開発するコラボレーションツールです。複数ユーザーによるコンテンツ管理機能を備えるなど、Wikipediaと同じ操作性や編集機能を持ちます。PHPで記述されており、MySQLやPostgreSQLをデータベースに使用できます。

Q&A

0回答

255閲覧

長文のページをVisualEditorで保存しようとするとタイムアウトしてしまう

One_of_Arthur

総合スコア76

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

MediaWiki

MediaWikiは、Wikipediaを運営するウィキメディア財団が開発するコラボレーションツールです。複数ユーザーによるコンテンツ管理機能を備えるなど、Wikipediaと同じ操作性や編集機能を持ちます。PHPで記述されており、MySQLやPostgreSQLをデータベースに使用できます。

0グッド

0クリップ

投稿2023/05/15 00:35

編集2023/05/15 00:51

実現したいこと

  • 情報量の多いページでも、VisualEditorでタイムアウトさせずに書き込みさせる

前提

MediaWiki 1.35をインストールしてみました。
このバージョンは、VisualEditorとParsoidを内包しているので簡単に導入できます。
VisualEditorの「編集」で情報量の多いページを保存しようとすると、60秒前後でタイムアウトのエラーが表示されます。
情報量の少ないページは、VisualEditorの「編集」でもちゃんと保存できます。
「ソースを編集」も情報量が多くてもちゃんと保存できます。

発生している問題・エラーメッセージ

エラーが発生しました… サーバーが決められた時間内に応答しませんでした。

イメージ説明

該当のソースコード

LocalSettings.php

1<?php 2# This file was automatically generated by the MediaWiki 1.35.10 3# installer. If you make manual changes, please keep track in case you 4# need to recreate them later. 5# 6# See includes/DefaultSettings.php for all configurable settings 7# and their default values, but don't forget to make changes in _this_ 8# file, not there. 9# 10# Further documentation for configuration settings may be found at: 11# https://www.mediawiki.org/wiki/Manual:Configuration_settings 12 13# Protect against web entry 14if ( !defined( 'MEDIAWIKI' ) ) { 15 exit; 16} 17 18 19## Uncomment this to disable output compression 20# $wgDisableOutputCompression = true; 21 22$wgSitename = "ニッチでドワーフなwiki"; 23 24## The URL base path to the directory containing the wiki; 25## defaults for all runtime URL paths are based off of this. 26## For more information on customizing the URLs 27## (like /w/index.php/Page_title to /wiki/Page_title) please see: 28## https://www.mediawiki.org/wiki/Manual:Short_URL 29$wgScriptPath = "/nd"; 30 31## The protocol and server name to use in fully-qualified URLs 32$wgServer = "http://localhost"; 33 34## The URL path to static resources (images, scripts, etc.) 35$wgResourceBasePath = $wgScriptPath; 36 37## The URL paths to the logo. Make sure you change this from the default, 38## or else you'll overwrite your logo when you upgrade! 39$wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/wiki.png" ]; 40 41## UPO means: this is also a user preference option 42 43$wgEnableEmail = true; 44$wgEnableUserEmail = true; # UPO 45 46$wgEmergencyContact = "www-data@localhost"; 47$wgPasswordSender = "www-data@localhost"; 48 49$wgEnotifUserTalk = false; # UPO 50$wgEnotifWatchlist = false; # UPO 51$wgEmailAuthentication = true; 52 53## Database settings 54$wgDBtype = "mysql"; 55$wgDBserver = "localhost"; 56$wgDBname = "ndwiki"; 57$wgDBuser = "root"; 58$wgDBpassword = "Pineapple"; 59 60# MySQL specific settings 61$wgDBprefix = "nd_"; 62 63# MySQL table options to use during installation or update 64$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary"; 65 66# Shared database table 67# This has no effect unless $wgSharedDB is also set. 68$wgSharedTables[] = "actor"; 69 70## Shared memory settings 71$wgMainCacheType = CACHE_NONE; 72$wgMemCachedServers = []; 73 74## To enable image uploads, make sure the 'images' directory 75## is writable, then set this to true: 76$wgEnableUploads = false; 77#$wgUseImageMagick = true; 78#$wgImageMagickConvertCommand = "/usr/bin/convert"; 79 80# InstantCommons allows wiki to use images from https://commons.wikimedia.org 81$wgUseInstantCommons = false; 82 83# Periodically send a pingback to https://www.mediawiki.org/ with basic data 84# about this MediaWiki instance. The Wikimedia Foundation shares this data 85# with MediaWiki developers to help guide future development efforts. 86$wgPingback = true; 87 88## If you use ImageMagick (or any other shell command) on a 89## Linux server, this will need to be set to the name of an 90## available UTF-8 locale. This should ideally be set to an English 91## language locale so that the behaviour of C library functions will 92## be consistent with typical installations. Use $wgLanguageCode to 93## localise the wiki. 94$wgShellLocale = "en_US.utf8"; 95 96## Set $wgCacheDirectory to a writable directory on the web server 97## to make your wiki go slightly faster. The directory should not 98## be publicly accessible from the web. 99#$wgCacheDirectory = "$IP/cache"; 100 101# Site language code, should be one of the list in ./languages/data/Names.php 102$wgLanguageCode = "ja"; 103 104$wgSecretKey = "949d5edba1c638abc55e86372e81561bfa6f0227b8e4eda246a4f2ad872053eb"; 105 106# Changing this will log out all existing sessions. 107$wgAuthenticationTokenVersion = "1"; 108 109# Site upgrade key. Must be set to a string (default provided) to turn on the 110# web installer while LocalSettings.php is in place 111$wgUpgradeKey = "973eba3160b29a48"; 112 113## For attaching licensing metadata to pages, and displaying an 114## appropriate copyright notice / icon. GNU Free Documentation 115## License and Creative Commons licenses are supported so far. 116$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright 117$wgRightsUrl = ""; 118$wgRightsText = ""; 119$wgRightsIcon = ""; 120 121# Path to the GNU diff3 utility. Used for conflict resolution. 122$wgDiff3 = "/usr/bin/diff3"; 123 124# The following permissions were set based on your choice in the installer 125$wgGroupPermissions['*']['edit'] = false; 126 127## Default skin: you can change the default skin. Use the internal symbolic 128## names, ie 'vector', 'monobook': 129$wgDefaultSkin = "vector"; 130 131# Enabled skins. 132# The following skins were automatically enabled: 133wfLoadSkin( 'MonoBook' ); 134wfLoadSkin( 'Timeless' ); 135wfLoadSkin( 'Vector' ); 136 137 138# Enabled extensions. Most of the extensions are enabled by adding 139# wfLoadExtension( 'ExtensionName' ); 140# to LocalSettings.php. Check specific extension documentation for more details. 141# The following extensions were automatically enabled: 142wfLoadExtension( 'CodeEditor' ); 143wfLoadExtension( 'VisualEditor' ); 144wfLoadExtension( 'WikiEditor' ); 145 146 147# End of automatically generated settings. 148# Add more configuration options below. 149 150 151 152$wgHTTPTimeout = 600; #これ大事 153$wgAsyncHTTPTimeout = 600; 154$wgHTTPConnectTimeout = 600; 155$wgHTTPMaxTimeout = 600; 156$wgHTTPMaxConnectTimeout = 600; 157$wgHTTPImportTimeout = 600; 158$wgExtensionInfoMTime = 600; 159$wgFeedCacheTimeout = 600; 160

試したこと

  • LocalSettings.phpで怪しそうな設定を600にした(上記ソースコードの末尾参照)
  • phpのmemory_limitを1024にした
  • phpのupload_max_filesizeを1024にした
  • phpのpost_max_sizeを1024にした
  • phpのmax_execution_timeを600にした
  • phpのmax_input_timeを600にした
  • phpのopcache.force_restart_timeoutを120にした
  • 設定をいじる度にsudo systemctl restart apache2
  • MySQLの怪しい設定を変更した
mysql> show global variables like '%timeout%'; +-----------------------------------+----------+ | Variable_name | Value | +-----------------------------------+----------+ | connect_timeout | 180 | | delayed_insert_timeout | 300 | | have_statement_timeout | YES | | innodb_flush_log_at_timeout | 1 | | innodb_lock_wait_timeout | 500 | | innodb_rollback_on_timeout | OFF | | interactive_timeout | 28800 | | lock_wait_timeout | 31536000 | | mysqlx_connect_timeout | 180 | | mysqlx_idle_worker_thread_timeout | 600 | | mysqlx_interactive_timeout | 28800 | | mysqlx_port_open_timeout | 0 | | mysqlx_read_timeout | 300 | | mysqlx_wait_timeout | 28800 | | mysqlx_write_timeout | 600 | | net_read_timeout | 300 | | net_write_timeout | 600 | | replica_net_timeout | 600 | | rpl_stop_replica_timeout | 31536000 | | rpl_stop_slave_timeout | 31536000 | | slave_net_timeout | 600 | | ssl_session_cache_timeout | 300 | | wait_timeout | 28800 | +-----------------------------------+----------+ 23 rows in set (0.00 sec)

補足情報(FW/ツールのバージョンなど)

Ubuntu 22.04.2 LTS
MediaWiki 1.35.10
PHP 7.4.33 (apache2handler)
MySQL 8.0.33-0ubuntu0.22.04.1
VisualEditor 0.1.2

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問