[postgis-tickets] r16367 - additional information for systemd Ubuntu

Bborie Park dustymugs at dspiral.net
Wed Jan 31 06:32:34 PST 2018


Author: dustymugs
Date: 2018-01-31 18:32:33 -0800 (Wed, 31 Jan 2018)
New Revision: 16367

Modified:
   trunk/doc/reference_raster.xml
Log:
additional information for systemd Ubuntu

Modified: trunk/doc/reference_raster.xml
===================================================================
--- trunk/doc/reference_raster.xml	2018-01-26 15:18:40 UTC (rev 16366)
+++ trunk/doc/reference_raster.xml	2018-02-01 02:32:33 UTC (rev 16367)
@@ -15208,9 +15208,13 @@
 					</para>
 
 					<para>
-						In Ubuntu (and assuming you are using PostgreSQL's packages for Ubuntu), the easiest way to change the <emphasis>Soft Limit</emphasis> and <emphasis>Hard Limit</emphasis> is to edit <emphasis role="strong">/etc/init.d/postgresql</emphasis>. In the example, we add <emphasis role="strong">ulimit -H -n 262144</emphasis> and <emphasis role="strong">ulimit -n 131072</emphasis>.
+						In Ubuntu (and assuming you are using PostgreSQL's packages for Ubuntu), the easiest way to change the <emphasis>Soft Limit</emphasis> and <emphasis>Hard Limit</emphasis> is to edit <emphasis role="strong">/etc/init.d/postgresql</emphasis> (SysV) or <emphasis role="strong">/lib/systemd/system/postgresql*.service</emphasis> (systemd).
 					</para>
 
+					<para>
+						Let's first address the SysV Ubuntu case where we add <emphasis role="strong">ulimit -H -n 262144</emphasis> and <emphasis role="strong">ulimit -n 131072</emphasis> to <emphasis role="strong">/etc/init.d/postgresql</emphasis>.
+					</para>
+
 					<programlisting>
 ...
 case "$1" in
@@ -15235,6 +15239,31 @@
 ...
 </programlisting>
 
+					<para>
+						Now to address the systemd Ubuntu case. We will add <emphasis role="strong">LimitNOFILE=131072</emphasis> to every <emphasis role="strong">/lib/systemd/system/postgresql*.service</emphasis> file in the <emphasis role="strong">[Service]</emphasis> section.
+					</para>
+
+					<programlisting>
+...
+[Service]
+<emphasis role="strong">
+LimitNOFILE=131072
+</emphasis>
+...
+
+[Install]
+WantedBy=multi-user.target
+...
+</programlisting>
+
+					<para>
+						After making the necessary systemd changes, make sure to reload the daemon
+					</para>
+
+					<programlisting>
+systemctl daemon-reload
+</programlisting>
+
 				</sect4>
 
 			</sect3>



More information about the postgis-tickets mailing list