WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual

For the people landing here by Google (because it's one of the most highly ranked page), see the content of modern /etc/default/neo4j:

It is NOT used for the new systemd service.
To change these values with systemd, please use

systemctl edit neo4j.service

Most of the modern Linux distro do use systemcd

(including the above mentionned Ubuntu 18.04 - save for a few exceptions such as Gentoo's OpenRC)
You need instead to add the file limit options in /etc/systemd/system/neo4j.service.d/override.conf using the above command.