Resolves Out Of Memory errors

In production, we’re getting out of memory errors when making the system call which attempts to fork a new process. 

This change gets the hostname only once, as the class loads. It's been running in our production environment for a week now and this error is resolved there.