Hello Mua, 

Where did you deploy your app? App Engine Standard, Flexible, Compute 
Engine VM? 

You should be aware that  /tmp is of temporary nature; moreover, the 
instance itself gets restarted from time to time, mainly for maintenance 
purposes. Saving files locally is not a solid long-term solution. The 
recommended solution consists in saving app data to Cloud Storage or Cloud 
SQL, where it is securely stored in permanent fashion.  

For Flexible, you may check Connecting to the instance 
<https://cloud.google.com/appengine/docs/flexible/python/debugging-an-instance#connecting_to_the_instance>
 page: 


To connect to an instance in the console:

   1. Visit the GCP Console instances page for your project:
   
   GO TO THE INSTANCES PAGE 
   <https://console.cloud.google.com/appengine/instances>
   2. Click *SSH* in the far right of the row containing the instance you 
   want to access:
   
   This puts the instance into debug mode, and opens an SSH session for the 
   instance in a terminal window.
   
   You can also select different options to start an SSH session from the 
   drop-down list.
   3. At this point you are in the instance host, which has several 
   containers <http://kubernetes.io/docs/whatisk8s/> running in it. See 
Understanding 
   common containers 
   
<https://cloud.google.com/appengine/docs/flexible/python/debugging-an-instance#understanding_common_containers>
 next 
   for more information about these.
   4. In the terminal window, list the containers running in the instance:
   
   sudo docker ps
   
   5. The output of the sudo docker ps command lists each container by row; 
   locate the row that contains your project ID: this is the container running 
   your code. Note the NAME of this container.
   6. Optionally, list logging information for your application by invoking:
   
   sudo docker logs [CONTAINER-NAME]
   
   7. Start a shell in the container that is running your code:
   
   sudo docker exec -it [CONTAINER-NAME] /bin/bash
   
   8. When finished debugging, enter exit to exit the container, then exit 
again 
   to exit the SSH session.
   9. Disable debugging for your instance to allow it to resume normal 
   operation.



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0b172782-04ea-4048-b557-836d29ef9987%40googlegroups.com.

Reply via email to