php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79137 Add request parameters to slow log script report
Submitted: 2020-01-19 11:32 UTC Modified: 2020-01-20 07:24 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nadavkav at gmail dot com Assigned:
Status: Open Package: FPM related
PHP Version: 7.3.13 OS: GNU/Linux RedHat 7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-01-19 11:32 UTC] nadavkav at gmail dot com
Description:
------------
Reading the slow log report entry, I am missing important information that was passed as request parameters to the script, so I can emulate the request when I analyze the reason for that slow query.

All I see now is:
[19-Jan-2020 04:04:31]  [pool www] pid 56016
script_filename = /var/www/moodle/index.php
[0x00007fccca813b80] query() /var/www/moodle/lib/dml/mysqli_native_moodle_database.php:1257
[0x00007fccca813a20] insert_record_raw() /var/www/moodle/lib/dml/mysqli_native_moodle_database.php:1305
[0x00007fccca813920] insert_record() /var/www/moodle/lib/classes/session/manager.php:431
[0x00007fccca813880] add_session_record() /var/www/moodle/lib/classes/session/manager.php:408
[0x00007fccca8136e0] initialise_user_session() /var/www/moodle/lib/classes/session/manager.php:82
[0x00007fccca813620] start() /var/www/moodle/lib/setup.php:785

But I have no idea what parameters were passed to the query: 
GET https://my-web-site/index.php 
which could help me re-query and investigate the reason for the slow script.

Please see if you can add to the slow log also the request query parameters.

Expected result:
----------------
Add query parameters to the slow log report:
(see: request query params = ['id' => 5, 'param' => value1] )


[19-Jan-2020 04:04:31]  [pool www] pid 56016
script_filename = /var/www/moodle/index.php
request query params = ['id' => 5, 'param' => value1]

[0x00007fccca813b80] query() /var/www/moodle/lib/dml/mysqli_native_moodle_database.php:1257
[0x00007fccca813a20] insert_record_raw() /var/www/moodle/lib/dml/mysqli_native_moodle_database.php:1305
[0x00007fccca813920] insert_record() /var/www/moodle/lib/classes/session/manager.php:431
[0x00007fccca813880] add_session_record() /var/www/moodle/lib/classes/session/manager.php:408
[0x00007fccca8136e0] initialise_user_session() /var/www/moodle/lib/classes/session/manager.php:82
[0x00007fccca813620] start() /var/www/moodle/lib/setup.php:785


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-19 11:33 UTC] nadavkav at gmail dot com
Seem somewhat related: https://bugs.php.net/bug.php?id=53434
 [2020-01-19 21:50 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2020-01-19 21:50 UTC] requinix@php.net
Is that not available through your access/request log?
 [2020-01-20 07:24 UTC] nadavkav at gmail dot com
-Status: Feedback +Status: Open
 [2020-01-20 07:24 UTC] nadavkav at gmail dot com
> Is that not available through your access/request log?
I do not think so.
And if so, how can I match those two logs? their is no unique key on both.
It seems trivial to display the incoming query params on the slow log, instead of trying to match the log entries with another access log.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Apr 10 10:01:24 2020 UTC