<p>In my experience, it's often because the cache size was set too high and fork()<br>
can't allocate sufficient memory for the child. However, if nothing to this<br>
effect is output, it's not clear what can be done.</p>
<p>This adds such output.</p>
<hr>
<h4>You can merge this Pull Request by running</h4>
<pre> git pull https://github.com/mojodna/osm2pgsql fork-error-message</pre>
<p>Or view, comment on, or merge it at:</p>
<p> <a href='https://github.com/openstreetmap/osm2pgsql/pull/47'>https://github.com/openstreetmap/osm2pgsql/pull/47</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Explain why fork() failed</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/47/files#diff-0">middle-pgsql.c</a>
(5)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/osm2pgsql/pull/47.patch'>https://github.com/openstreetmap/osm2pgsql/pull/47.patch</a></li>
<li><a href='https://github.com/openstreetmap/osm2pgsql/pull/47.diff'>https://github.com/openstreetmap/osm2pgsql/pull/47.diff</a></li>
</ul>