##わからないこと
いつもお世話になっております。
この度テーブルにカラムを追加したところ、タイトルにあるようなエラーが発生しました。
AWSを使用しているのですが、パラメータを設定すれば回避できるものでしょうか?
また、どういった点を見れば修正などの糸口がつかめますでしょうか?
###エラー文
[Illuminate\Database\QueryException] Empty row packet body (SQL: select `r_id`, `place`, `keyword`, `except`, `note` from `rkeywords` where `use` = 1) [ErrorException] Empty row packet body
エラーが発生しているテーブルのエンジンは「InnoDB」です。
##追記
net_read_timeout = 360 net_write_timeout = 360
をコードに追加したところ、エラー自体は発生しなくなりました。
しかし非常に処理が遅い状態にあります。
##テーブル定義
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `r_id` bigint(20) unsigned NOT NULL, `use` tinyint(4) NOT NULL, `progmail` tinyint(4) DEFAULT '1', `place` text COLLATE utf8_unicode_ci NOT NULL, `keyword` text COLLATE utf8_unicode_ci NOT NULL, `except` text COLLATE utf8_unicode_ci, `note` text COLLATE utf8_unicode_ci, `meta` longtext COLLATE utf8_unicode_ci, `list_keyword` text COLLATE utf8_unicode_ci, `list_ng` text COLLATE utf8_unicode_ci, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `rkeywords_resume_id_unique` (`r_id`), KEY `place_use_id_index` (`place`(255),`use`,`id`), CONSTRAINT `rkeywords_r_id_foreign` FOREIGN KEY (`r_id`) REFERENCES `rs` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=496 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
##PHP
ini_set('memory_limit', '512M'); ini_set('net_read_timeout', '360'); ini_set('net_write_timeout', '360'); $mysqlRDS = DB::connection('mysql'); foreach ((array)$mysqlRDS->table('rkeywords')->select('r_id','place','keyword','except','note')->get() as $keyword) { }
PHPにつきましては、テーブルに接続し、該当するカラムを取得する処理に該当します
申し訳ございませんが、何卒宜しくお願い致します。
回答1件
あなたの回答
tips
プレビュー