mirror of
https://github.com/pi-hole/docs.git
synced 2026-02-15 07:26:03 +00:00
Change instructions to increase PHP memory_limit
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -54,31 +54,54 @@ Ask the list maintainer to convert the IDNs to their punycode representation.
|
||||
Internationalizing Domain Names in Applications (IDNA) was conceived to allow client-side use of language-specific characters in domain names without requiring any existing infrastructure (DNS servers, mall servers, etc., including associated protocols) to change. Accordingly, the corresponding original [RFC 3490](https://tools.ietf.org/html/rfc3490) clearly states that IDNA is employed at application level, not on the server side.
|
||||
Hence, DNS servers never see any IDN domain name, which means DNS records do not store IDN domain names at all, only their [Punycode](https://en.wikipedia.org/wiki/Punycode) representations.
|
||||
|
||||
### While loading data from the long-term database you encountered an error
|
||||
### Error while loading data from the long-term database
|
||||
|
||||
If requesting a lot of data from the long-term database you get this error
|
||||
|
||||
```code
|
||||
An unknown error occurred while loading the data.
|
||||
Check the server's log files (/var/log/lighttpd/error.log when you're using the default Pi-hole web server) for details. You may need to increase the memory available for Pi-hole in case you requested a lot of data.
|
||||
|
||||
Check the server's log files (/var/log/lighttpd/error.log) for details.
|
||||
|
||||
You may need to increase PHP memory limit.
|
||||
|
||||
You can find more info in pi-hole's FAQ:
|
||||
https://docs.pi-hole.net/main/faq/#error-while-loading-data-from-the-long-term-database
|
||||
```
|
||||
|
||||
**Solution:**
|
||||
|
||||
Increase PHP's memory and restart the server.
|
||||
You need to increase PHP's memory and restart the server.
|
||||
|
||||
Replace `*` with your installed PHP version (e.g. `.../php/7.3/cgi/...`) to edit the file. Increase the `memory_limit`. You can use common abbreviation (M= megabyte, G= gigabyte). The amount of memory needed depends on many factors, e.g. availabe system RAM, other processes running on your device, the amount of data you want to process. Do not assign all availabe memory as this can freeze your system. One approache would be to double the limit and check if it might be already sufficient to retrieve the data. If not, add another 128M, check again, add another 128M,....
|
||||
The amount of memory needed depends on many factors:
|
||||
|
||||
- availabe system RAM,
|
||||
- other processes running on your device,
|
||||
- the amount of data you want to process.
|
||||
|
||||
One aproach would be to increase the limit by 128M and check if it was enough to retrieve the data.
|
||||
If not, add another 128M, check again. If not, add another 128M, check again, until you find the best value.
|
||||
|
||||
_Note:_
|
||||
Do not assign all availabe memory as this can freeze your system.
|
||||
Please consider the possibility that your system does not have enough memory at all to load all the needed data.
|
||||
|
||||
_Steps to increase `memory_limit`:_
|
||||
|
||||
Open or create `.user.ini` file:
|
||||
|
||||
```bash
|
||||
sudo nano /etc/php/*/cgi/php.ini
|
||||
[..]
|
||||
; Maximum amount of memory a script may consume (128MB)
|
||||
; http://php.net/memory-limit
|
||||
memory_limit = 128M
|
||||
[..]
|
||||
sudo nano /var/www/html/.user.ini
|
||||
```
|
||||
|
||||
Add (or change) the memory limit (common abbreviation M=megabyte, G=gigabyte):
|
||||
|
||||
```ini
|
||||
memory_limit = 256M
|
||||
```
|
||||
|
||||
Restart the web server:
|
||||
|
||||
```bash
|
||||
sudo service lighttpd restart
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user