{"id":12258,"date":"2024-01-15T03:25:31","date_gmt":"2024-01-15T11:25:31","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=12258"},"modified":"2024-01-15T03:25:31","modified_gmt":"2024-01-15T11:25:31","slug":"google-drive-disappearing","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/google-drive-disappearing\/","title":{"rendered":"Q&#038;A: My Google Drive keeps Disappearing. Help!"},"content":{"rendered":"<div align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"no-lazy-load\" src=\"\/blog\/images\/qa-google-drive-not-working.webp\" style=\"margin-bottom:20px;\" title=\"TITLE\" alt=\"TITLE\" border=\"0\" width=\"350\" height=\"160\" \/><\/div>\n<div class=\"blog-qa-question-box\">\n<img loading=\"lazy\" decoding=\"async\" class=\"no-lazy-load\" src=\"https:\/\/cdn.coretechnologies.com\/images\/quotes-transparent-21x21.webp\" width=\"21\" height=\"21\" \/>&nbsp;&nbsp;Hi, Core Technologies support team.<\/p>\n<p><a href=\"\/products\/AlwaysUp\/\">AlwaysUp<\/a> has been invaluable to our business, which is why I&#8217;ve bought several copies for different machines.<\/p>\n<p>Recently I started running into a problem on my production PC. I searched for a bit through your FAQs and blogs but didn&#8217;t see this particular problem. Maybe you have a quick workaround?<\/p>\n<p>I&#8217;ve set up <a href=\"\/products\/AlwaysUp\/Apps\/InstallGoogleDriveDesktopWindowsService.html\">Google Drive for desktop to run as a service<\/a>. An application on that production PC depends on the G: drive being present.<\/p>\n<p>But sometimes the G: drive disappears after a while, even though AlwaysUp shows Google Drive running.<\/p>\n<p>When that happens, my application goes haywire. Eventually, I&#8217;ll have to debug to keep the app from crashing when the G drive is not available, but in the meantime, do you have an answer for what&#8217;s happening?<\/p>\n<p>I will appreciate any help you can provide.<\/p>\n<p align=\"right\">&mdash; Randy<\/p>\n<\/div>\n<p>Hi Randy, thanks for reaching out to report the problem. No one on our team has seen Google Drive failing as you described so we can&#8217;t say precisely what going on, sorry.<\/p>\n<p>But we can offer a couple of solutions that should (1) lessen the occurrence of the problem and (2) quickly restore functionality when the problem arises.<\/p>\n<h2 class=\"blog-caption\">Solution #1: Have AlwaysUp restart Google Drive every night<\/h2>\n<p>If Drive breaks after it&#8217;s been running for some time, the program may have a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Resource_leak\" target=\"_blank\" rel=\"noopener\">resource leak<\/a>.<\/p>\n<p>Perhaps Drive isn&#8217;t freeing all the RAM it&#8217;s requested. Or it may be holding on to a network port for too long. Or it could be something else. It&#8217;s difficult to pinpoint the issue because we don&#8217;t have access to the source code (or to decent log files, for that matter).<\/p>\n<p>For mysterious situations like this, we recommend introducing a nightly restart. That is, you should have AlwaysUp automatically restart Google Drive at a set time when no one is likely to be using it. <\/p>\n<p>The theory is that restarting Google Drive will clear out any resource leaks. Afterwards, the program will come up &#8220;fresh&#8221; and ready to do its work &mdash; at least for the next few hours.<\/p>\n<p>To restart Drive nightly:<\/p>\n<ol style=\"margin-bottom:24px\">\n<li>\n<p>Edit Google Drive in AlwaysUp (select <b>Application &gt; Edit\/View &#8220;Google Drive for desktop&#8221;<\/b> from the menu).<\/p>\n<\/li>\n<li>\n<p>In the <b>Edit\/View Application<\/b> window that comes up, switch to the <b>Monitor<\/b> tab.<\/p>\n<\/li>\n<li>\n<p>Check the <b>Every<\/b> box, select <b>Day<\/b> from the drop-down and choose a convenient time to restart Google Drive. 2 AM works for us:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/alwaysup-restart-google-drive-nightly.png\" class=\"zoomPopup\" title=\"Restart Google Drive every night at 2 AM\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/alwaysup-restart-google-drive-nightly.png\" title=\"Restart Google Drive every night at 2 AM (click to enlarge)\" alt=\"Restart Google Drive every night at 2 AM\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>Save your changes.<\/p>\n<\/li>\n<\/ol>\n<p>With that setting in place, AlwaysUp will restart Drive every night at 2 AM. And as a result, <b>no instance of Drive will run for longer than a day<\/b>. If we&#8217;re lucky, no resource leak will grow fast enough to cripple Drive within those 24 hours.<\/p>\n<p>But if we&#8217;re not dealing with a resource leak and Drive can stop working at any time, a nightly restart won&#8217;t help much. Fortunately, the next solution tackles the problem more directly.<\/p>\n<h2 class=\"blog-caption\">Solution #2: Install a sanity check to detect the failure and automatically restart Google Drive<\/h2>\n<p>We built AlwaysUp to handle a range of failures while running an application. For example, AlwaysUp can detect and automatically recycle programs that:<\/p>\n<ul style=\"margin-bottom:24px\">\n<li>\n<p>Use too much memory;<\/p>\n<\/li>\n<li>\n<p>Run wild with the CPU;<\/p>\n<\/li>\n<li>\n<p>Get stuck at a crash window;<\/p>\n<\/li>\n<li>\n<p>Become unresponsive to input.<\/p>\n<\/li>\n<\/ul>\n<p>For those cases, you simply specify the restrictions (e.g. the maximum RAM to use) and AlwaysUp will deal with any violations on your behalf.<\/p>\n<p>But none of those built-in capabilities will help with your Google Drive problem. When Drive fails, it&#8217;s not related to CPU, RAM or any of the metrics that AlwaysUp tracks. <b>It&#8217;s about knowing when your G drive isn&#8217;t mapped.<\/b><\/p>\n<p>To handle non-standard failures like yours, we must rely on AlwaysUp&#8217;s <a href=\"\/products\/AlwaysUp\/Plugins\/\">Sanity Check<\/a> feature. We&#8217;ll write a batch file that detects when the G drive isn&#8217;t mapped and then show you how to plug that into AlwaysUp.<\/p>\n<h3 class=\"blog-caption\">Download our sanity check to detect when your G drive isn&#8217;t available<\/h3>\n<p>Here is the batch file we developed for your situation:<\/p>\n<div style=\"margin-top:24px;margin-bottom:24px;\">\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\">@<span style=\"color: #008800; font-weight: bold\">echo<\/span> <span style=\"color: #008800; font-weight: bold\">off<\/span>\r\n<span style=\"color: #888888\">:: This batch file checks if a drive letter is mapped or not.<\/span>\r\n<span style=\"color: #888888\">:: It exits with 0 if the drive is mapped and 1 if it isn't.<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">SET<\/span> <span style=\"color: #996633\">gdrive<\/span><span style=\"color: #333333\">=<\/span>G\r\n<span style=\"color: #008800; font-weight: bold\">if<\/span> <span style=\"color: #008800; font-weight: bold\">exist<\/span> <span style=\"color: #996633\">%gdrive%<\/span>:\\ (\r\n    \t<span style=\"color: #008800; font-weight: bold\">echo<\/span> The <span style=\"color: #996633\">%gdrive%<\/span> drive is mapped Exiting with <span style=\"color: #6600EE; font-weight: bold\">0<\/span> to continue running.\r\n\texit \/b <span style=\"color: #6600EE; font-weight: bold\">0<\/span>\r\n)\r\n<span style=\"color: #008800; font-weight: bold\">echo<\/span> The <span style=\"color: #996633\">%gdrive%<\/span> drive is NOT mapped. Exiting with <span style=\"color: #6600EE; font-weight: bold\">1<\/span> to restart.\r\nexit \/b <span style=\"color: #6600EE; font-weight: bold\">1<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<p>As you can see, it simply checks if the G:\\ folder exists and returns:<\/p>\n<ul style=\"margin-bottom:24px\">\n<li>\n<p>0 if G:\\ is accessible<\/p>\n<\/li>\n<li>\n<p>1 if G:\\ cannot be accessed<\/p>\n<\/li>\n<\/ul>\n<p>Please <a href=\"\/products\/AlwaysUp\/Plugins\/check-google-drive-mapped.bat\">download the script<\/a> and save it in a known location on your computer running Google Drive. We&#8217;ll use it in the next step.<\/p>\n<h3 class=\"blog-caption\">Plug the sanity check into AlwaysUp<\/h3>\n<p>Since we have a batch file to detect the problem, let&#8217;s tell AlwaysUp how to use it:<\/p>\n<ol style=\"margin-bottom:24px\">\n<li>\n<p>Edit Google Drive in AlwaysUp (select <b>Application &gt; Edit\/View &#8220;Google Drive for desktop&#8221;<\/b> from the menu).<\/p>\n<\/li>\n<li>\n<p>In the <b>Edit\/View Application<\/b> window that comes up, switch to the <b>Monitor<\/b> tab.<\/p>\n<\/li>\n<li>\n<p>Check the <b>Whenever it fails a &#8220;sanity check&#8221; box<\/b> and click the <b>&#8230;<\/b> button:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/alwaysup-install-sanity-check.png\" class=\"zoomPopup\" title=\"Install the sanity check\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/alwaysup-install-sanity-check.png\" title=\"Install the sanity check (click to enlarge)\" alt=\"Install the sanity check\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>In the <b>Configure Sanity Check<\/b> window that comes up, enter the full path to the batch file in the <b>Run<\/b> field and specify how often to perform the sanity check. Every 5 minutes should be enough so that&#8217;s what we entered:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/configure-google-drive-sanity-check.png\" class=\"zoomPopup\" title=\"Configure the Google Drive sanity check\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/configure-google-drive-sanity-check.png\" title=\"Configure the Google Drive sanity check (click to enlarge)\" alt=\"Configure the Google Drive sanity check\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>Save your changes.<\/p>\n<\/li>\n<\/ol>\n<p>And with that sanity check in place, AlwaysUp will run the batch file every 5 minutes. If the batch file returns 0, indicating that the G drive is available, nothing will happen. AlwaysUp will continue to babysit Google Drive (and schedule the next check for 5 minutes later).<\/p>\n<p>But if the batch file returns 1 &mdash; because it couldn&#8217;t access the G drive &mdash; AlwaysUp will promptly shut down Google Drive and start a new copy. Doing so should restore access to the G drive.<\/p>\n<p style=\"margin-top: 30px\">\nHappy Google Driving!\n<\/p>\n<div style=\"margin-top:30px\" align=\"center\">\n<div class=\"cta-button-1\">\n<table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td align=\"center\"><a href=\"\/blog\/tag\/google-drive\/\" title=\"More articles about Google Drive\"><span><nobr>More articles about Google Drive&#8230;<\/nobr><\/span><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/remove-login-startup-task\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: How do I Remove an AlwaysUp At-Login Startup Task?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/delete-properties-150x150-1.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: How do I Remove an AlwaysUp &quot;At-Login&quot; Startup Task?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/vb6-memory-leaks\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: How do I Make AlwaysUp Babysit my Leaky VB6 Program?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/memory-leaks-growing-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: How do I Make AlwaysUp Babysit my &quot;Leaky&quot; VB6 Program?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/stop-plex-windows-service\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: How do I Avoid Errors when Stopping my Plex Windows Service?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/plex-logo-2-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: How do I Avoid Errors when Stopping my Plex Windows Service?<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;Hi, Core Technologies support team. AlwaysUp has been invaluable to our business, which is why I&#8217;ve bought several copies for different machines. Recently I started running into a problem on my production PC. I searched for a bit through your &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/google-drive-disappearing\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":12260,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[26,85,127,304,138],"class_list":["post-12258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-alwaysup","tag-alwaysup-tag","tag-google-drive","tag-qa","tag-regular-restart","tag-sanity-check"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/12258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=12258"}],"version-history":[{"count":10,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/12258\/revisions"}],"predecessor-version":[{"id":12304,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/12258\/revisions\/12304"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/12260"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=12258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=12258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=12258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}