Mod_fcgid and /tmp


I’m looking at some issues I’m seeing with mod_fcgid and /tmp. mod-fcgid is currently creating a temp file for whatever is coming over the socket. Due to the nature of the 128mb /tmp this can easily fill up and just cause issues. I’ve tried creating a wrapper script and exporting TMPDIR to another directory and this did not help. Has anyone had any success with moving this location for mod_fcgid without rebuilding from source (which I can look to do)?

Also FcgidInitialEnv TMPDIR doesn’t help this situation.

Unfortunately, I’m not sure there’s any way to override the use of /tmp here. I dug into the mod_fcgid source, and it’ll always store its files in the directory returned by apr_temp_dir_get(). On Linux, I’m pretty certain that’s always /tmp.

If you don’t mind some decrease in performance, you can ask Support to switch /tmp on your VPS to be stored on disk instead of tmpfs. That’ll let you store more than 128 MB of data in there.

I’m not too concerned with a performance loss as the site takes minimal traffic. Is there an additional cost in modifying the configuration of the VPS to move /tmp to ondisk?

No financial cost, no. It does mean we have to reboot the VPS, but you probably figured as much.

Yup, figured so. Thanks again Andrew. So I can just contact support through the VPS admin interface?

Yep — in the DreamHost Panel under Support > Contact Support.