Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to enable/disable debug logging in Plesk?
Answer
The debug mode can be enabled either via the Plesk Panel.ini Editor extension in Plesk or in the Plesk configuration file "panel.ini" directly on a Plesk server.
In Plesk for Linux, debug log entries are written to the Plesk logfile /var/log/plesk/panel.log
. Also, when running Plesk utilities with debug mode enabled in a command-line interface, they will produce debug log entries in their output.
In Plesk for Windows Server, debug log entries are written to the Plesk logfile %plesk_dir%admin\logs\php_error.log
.
Warning: Once you are done with troubleshooting, disable debug mode back. Otherwise, it may fill up disk space over time.
-
Install the Panel.ini Editor from the Extensions menu in Plesk.
-
Open Panel.ini Editor at Extensions > My Extensions.
-
In Panel.ini Editor, switch to the Editor tab. If the editor is empty, do the following:
3.1. Download the panel_ini.txt file.
3.2. Open the downloaded file and copy its content.
3.3. Paste the content into the editor.
-
Edit the the content and click Save:
-
To enable debug mode, remove a semicolon ";" at the beginning of the lines highlighted on the picture.
-
To disable debug mode, put a semicolon ";" back at the beginning of the lines.
-
-
Connect to a Plesk server via SSH.
-
Сheck if the "panel.ini" configuration file exists:
# ls -l /usr/local/psa/admin/conf/panel.ini
-
If the file
/usr/local/psa/admin/conf/panel.ini
does not exist or is empty, create it from the sample file/usr/local/psa/admin/conf/panel.ini
:# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
-
-
Open the file
/usr/local/psa/admin/conf/panel.ini
in a text editor. In this example, we are using the vi editor and the command:# plesk conf panel.ini
-
Edit the
panel.ini
file:-
To enable debug mode, remove a semicolon ";" at the beginning of the bold lines shown in the example below.
-
To disable debug mode, put a semicolon ";" back at the beginning of the bold lines.
Example of enabled debug mode:
CONFIG_TEXT: [debug]
; Enable debug mode (do not use in production environment)
enabled = on
[log]
; Log messages verbosity level (from 0 to 7)
; 0 - only critical errors, 7 - all including debug messages, default - 3
filter.priority = 7
; Enable logging of SQL queries
show.sql_query = on
; Enable logging of external utilities calls
show.util_exec = on
; Enable logging of stdin and stdout for external utilities calls (do not use in production environment)
show.util_exec_io = on -
-
Save the changes and close the file. The changes will be applied immediately, no service restart is required.
-
Example of Plesk utility output when debug mode is enabled:
# /usr/local/psa/bin/ip_ban --update -ban_period 600 -ban_time_window 600 -max_retries 10
DEBUG [dbquery] [0] SQL: SET sql_mode = ''
DEBUG [dbquery] [0] END: 0.00023102760314941 sec
DEBUG [dbquery] [1] SQL: SET NAMES utf8
DEBUG [dbquery] [1] END: 0.00013208389282227 sec
DEBUG [dbquery] [2] SQL: connect
DEBUG [dbquery] [2] END: 0.00038313865661621 sec
DEBUG [dbquery] [3] SQL: SET sql_mode = ''
DEBUG [dbquery] [3] END: 0.00014400482177734 sec
...
SUCCESS: The settings were updated. -
Example of Plesk utility output when debug mode is disabled:
# /usr/local/psa/bin/ip_ban --update -ban_period 600 -ban_time_window 600 -max_retries 10
SUCCESS: The settings were updated.
-
-
Connect to a Plesk server via RDP.
-
Open the file
panel.ini
located in the folder%plesk_dir%admin\conf\
(Just paste this path in Windows Explorer to open) in any text editor.- If the
panel.ini
file does not exist, create it by copying the sample configuration filepanel.ini.sample
.
- If the
-
Edit the
panel.ini
file:-
To enable debug mode, remove a semicolon ";" at the beginning of the bold lines shown in the example below.
-
To disable debug mode, put a semicolon ";" back in the lines.
Example of enabled debug mode:
CONFIG_TEXT: [debug]
; Enable debug mode (do not use in production environment)
enabled = on
[log]
; Log messages verbosity level (from 0 to 7)
; 0 - only critical errors, 7 - all including debug messages, default - 3
filter.priority = 7
; Enable logging of SQL queries
show.sql_query = on
; Enable logging of external utilities calls
show.util_exec = on
; Enable logging of stdin and stdout for external utilities calls (do not use in production environment)
show.util_exec_io = on -
-
Save the changes and close the file. Changes will be applied immediately, no service restart is required.
Comments
8 comments
After a Plesk Upgrade from 12.5 to Onyx, the Plesk debug log is filling up the server, even when debug is disabled:
; * Enabled debug mode or high log level can be the reason of panel slowdown.
[debug]
; Enable debug mode (do not use in production environment)
enabled = off
Plesk keeps logging in debug mode. How to turn it off?
Hi @Luke Galea
It's /var/log/plesk/panel.log file on Linux and %plesk_dir%admin\logs\php_error.log on Windows Server.
after commenting the line the debug is still active.
Even when setting the value to off the debug persists. (service restart doesn't work)
There must be another config file. But in this article I would expect that there is a link to other files if the mentioned fix doesn't work.
If debug mode was accidently left on - which locations are expected to fill up with 'unnecessary' files?
Hi,
Is it safe to leave it on permanently? Enable debug logging has some effect on e.g. performance?
Claudio please restart Plesk services running the below command from SSH:
If won't work I do recommend to reboot the server
Hi Dave, Plesk is not a hosting company, we don't host any websites.
p.s. I used online tool and it shows that IP belongs to iDigital internet, might be you need to reach them for a help
The motherboard on my computer crashed, and I had to buy a new computer. I tried to login to my website on my https://sheetmusicnotes.ca which is hosted by Plesk, but I have forgotten both my username and password for the site,. I tried reset to get a new password by entering the email address I think I used when I registered for a website davidphilley@gmail.com but I get an error message Error: The email address was not recognized. Please double-check and try again.
Can you please send me the info I need to login to my site?
Please sign in to leave a comment.