WeChat Cloud Hosting FAQ (1)
Q1: 8 hours difference between cloud hosting?
A: The container system time defaults to UTC Coordinated Universal Time (Universal Time Coordinated), which is 8 hours away from the local time zone CST (Shanghai Time):
When building a base image or making a custom image based on the base image, creating a time zone file in the Dockerfile can solve the time zone inconsistency problem within a single container, and the time zone problem will no longer be bothered by the subsequent use of the image.
1. Open the Dockerfile.
2. Write the following to configure the time zone file
FROM centos as centos COPY --from=centos /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo "Asia/Shanghai" > /etc/timezone
3. Rebuild the container image and redeploy with the new image. Or directly upload the code package with the new Dockerfile to redeploy.
Q2: What is the role of cloud hosting?
A: Deploy the applet/official account backend instead of the server.
Q3: cloud hosting host back-end services?
A: Cloud hosting is a cloud-native fully managed container back-end cloud service for developers, which supports hosting containerized applications of any language and framework.
Q4: Is there a relationship between Tencent Cloud and WeChat Cloud hosting? What is the difference between cloud hosting and WeChat cloud hosting for cloud development?
A: WeChat cloud hosting is a comprehensive solution that integrates Tencent Cloud's underlying resources and WeChat ecological links. The cloud hosting in the original cloud development is independent and upgraded to WeChat cloud hosting, supplementing more complete back-end functions and enterprise-level devops capabilities such as database, ci/cd, and grayscale publishing.
Q5: Can't log in to the cloud hosting console?
A: The applet test number/trial number is not supported. The applet quickly created by a third party needs to be bound with the mobile phone number in the background of the applet mp before you can log in. For the applet created quickly, you can go to the “Mini Program Assistant” applet settings first. After the login email and password are set, you can go to the WeChat public platform to log in. For details, please refer to the guidelines: https://kf.qq.com/touch/sappfaq/200617VbQzaa200617aq67ru.html
Q6: The deployment of fails and the port is abnormal?
A: There are two possibilities for the port exception: 1. The program starts normally, but the wrong port is filled in, resulting in failure to connect; 2. The port is not filled in wrong, but the program starts abnormally, resulting in failure to connect.
Q7: has not been configured with expansion and shrinkage conditions. Why does it keep showing that the service is expanding?
A: By default, the system configures the expansion and shrinkage conditions that the cup usage rate is >=60%. The expansion and shrinkage conditions are triggered during the expansion. If you need to adjust, you can go to "Console - Service Management - Service Settings - Basic Settings" to make changes.
Q8: cloud hosting support multiple port listening?
A: Currently only one listening port is supported. For better experience and performance, a service is recommended to contain only one process, dedicated to completing one thing. If there are multiple processes, split them into multiple services, so that each service should only need one port, so that the service can be more focused, and the capacity can be scaled independently according to the usage.
Q9: How long will the cloud-hosted instances of be released?
A: When the minimum value of the instance is set to 0, it will be scaled down to 0. If there is no request within 30 minutes, it will be scaled down to 0.
Q10: How do make the service run permanently?
A: Set the minimum number of instance replicas to 1. Path: Service Management - Service List - Service Settings - Basic Information.
Q11: cloud hosting connect to Tencent Cloud's message queue RabbitMQ version?
A: Yes, it can be guaranteed to be in the same vpc.
Q12: Does the local debugging of the and open interface services require cloudbase_access_token?
A: For local debugging, please use the VSCode debugging plug-in, which will automatically generate cloudbase_access_token, details .
Q13: How to use WeChat token for local debugging of applet?
A: The applet can refer to the document to use the VSCode plug-in for local debugging, and can use the WeChat token and authentication-free capability: Open Interface Service | WeChat Open Document .
Q14: cloud hosting support other databases besides MySQL?
A: If you use other databases, you can purchase them on Tencent Cloud and use them with cloud hosting. You can buy them under the same VPC as cloud hosting. (Cloud hosting VPC path: Console - Settings - Environment Settings - Network)
Q15: Where can I view the password of the cloud-hosted database?
A: WeChat cloud hosting will not store the database password, please keep it properly, if you forget to reset the password. (For example, if the database is created by one-click deployment, the account secret can also be viewed in the WeChat service notification)
Q16: cloud hosting use the database developed by the cloud?
A: Cloud hosting cannot directly use the cloud development database, it is recommended to use the MySQL database that comes with cloud hosting; if you must use the cloud development database, only the node.js language can be used to call the official node-sdk; other types of other languages There is no SDK support for the database at the moment; other cloud databases in Tencent Cloud can only be used under the same VPC as the cloud hosting environment. (Cloud-hosted VPC path: Console-Settings-Environment Settings-Network)
Q17: Why does the cloud-hosted database automatically pause?
A: By default, the database is not automatically suspended for reading and writing within 10 minutes. If you need to cancel the suspension, you can go to the database to turn off the automatic suspension.
Q18: Will the table structure of the cloud-hosted database be initialized?
A: The system will not do any operation on the database.
Q19: How long will the cloud-hosted database be cancelled?
A: It will not be canceled automatically, unless the user cancels himself or the account is in arrears for 7 days.
Q20: callContainer limit the size of the return packet?
A: The return packet size limit is 1000k.
Q21: to call the cloud hosting service, prompting that the service name does not exist?
A: The service name does not exist, there may be the following situations:
- The service name is incorrectly filled in, and the service does not exist in the environment;
- The environment id is incorrectly filled in, and the service does not exist in the wrongly filled environment;
- The service is called in an applet that is not bound to the corresponding cloud hosting environment. The environment is bound to applet A but called in applet B;
- Service has been removed.
Q22: The events of the public account are pushed to cloud hosting, why is there no unionid?
A: The public account needs to be bound to the open account, and the requested headers will be accompanied by x-wx-unionid.
Q23: configure cloud-hosted message push - how to fill in the path value?
A: The interface under the service can be received by writing the path of the interface in the service. For example, the root path is filled in /.
Q24: use cloud hosting, how to bind the service configuration of the official account? Can I directly access the external network URL provided by the cloud hosting to access the service?
A: You don't need to fill in the server configuration again, you can directly use the WeChat Open Capability - "Open Interface Service" . In addition, it is more recommended to use callcontainer in the official account instead of directly accessing the service on the public network.
Q25: cloud hosting a fixed egress IP?
A: No, the IP of the export and entrance is not fixed, and the fixed IP will be opened as a payment capability in the future.
Q26: cloud hosting be deducted from DDoS?
A: There are two situations here:
1. By calling callcontainer+to close the public network access mode, you can completely prevent DDoS;
2. If the user opens the public network access and attracts DDoS, charges will still be incurred.
Q27: How to purchase resources when the free quota expires or is used up?
A: After the free quota expires or is used up, it will be charged according to the actual usage. If you need to purchase resource packs, you can go to "Cloud Hosting Console - Resource Monitoring - Resource Usage - Resource Packs" to purchase a suitable resource pack.
Q28: Can the resource pack increase the duration?
A: The duration cannot be superimposed, only the amount can be superimposed.
Q29: accidentally opened a cloud hosting environment, but did not create a service, will the fee be deducted?
A: No. There is no charge for running without an instance.
最佳实战 | 使用微搭低代码实现腾讯问卷满意度调查
海洋饼干赞 1阅读 832
使用taro+canvas实现微信小程序的图片分享功能 | 京东云技术团队
京东云开发者赞 2阅读 367
HappyCodingTop赞 1阅读 1.3k
基于微信云开发 SayLove 表白墙微信小程序V1.0
5 分钟带你小程序入门 [实战总结分享]
程序员海军赞 2阅读 463
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用。你还可以使用