Dedicated server, Running my own DNS server, Apache 2, A Ruby on Rails App running on Phusion Passenger 2.2.9, using rail's dynamic asset host generator that fetches assets using these subdomains: static1, static2, static3, static4. In my Apache config theres a wildcard for subdomains *.domain.com.
If I go to the website after I haven't been on it for while (a few hours) sometimes one or more of the asset subdomains takes really long to load or doesn't load at all. I'm suspecting that my DNS server is not setup correctly and the lookup for one of the subdomains fails or takes really long. I used a few DNS checkers but haven't found any major problems with my DNS setup. This only happens when I visit the website after I haven't been on it for a while, as I start browsing the website everything loads just fine. Right now I switched back to using only 1 asset subdomains (static.domain.com) this seems to work. I'm just curious to know if there's something wrong with my DNS setup or my apache configuration. I can provide other details if needed.