Menu

#29 Save on server resources

not set
closed
Kempelen
None
2022-04-10
2022-04-10
Kempelen
No

This patch for rendermymap-incron.sh will save on server resources by

  • run only one process at a time (lockfile)
  • limit memory
  • run with nice

Thanks to the serveradmin for the patch ;-)

!/bin/bash
# Passes the new rendering job file to the renderer
# Should be called from incron

# Incron example (watchdir, watchtype, startwhat, path+file as param)
#/srv/html/rendermymap-orig/jobs IN_CLOSE_WRITE /srv/osmrender/bin/rendermymap-incron.sh $@/$#

cd /srv/osmrender/bin/
lockfile -r 75 -l 600 .rendering-lock || exit
. rendermymap.config
ulimit -Sv1310720
nice -n 20 ./rendermymap.sh $* >>$LOGFILE 2>&1
rm -f .rendering-lock

Discussion

  • Kempelen

    Kempelen - 2022-04-10
    • status: open --> closed
     
  • Kempelen

    Kempelen - 2022-04-10

    Added to the code in Commit [66b525]

     

    Related

    Commit: [66b525]


Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.