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.

云开发CloudBase官方技术专栏!微信 x 腾讯云联合提供的小程序·云开发服务,快速构建小程序、Web和移动...

云开发(Tencent CloudBase,TCB)是云端一体化的后端云服务 ,采用 serverless 架构,免去了移动应用构...

422 声望
438 粉丝
0 条评论
最佳实战 | 使用微搭低代码实现腾讯问卷满意度调查
1、在需要添加问卷的应用中(目前暂时只支持 PC/H5 应用),加入弹窗组件及打开问卷的按钮:2、新增点击时行为,选择页面跳转并将问卷的投放链接填入:3、最终预览并发布应用即可。

CloudBase云开发阅读 1.2k


海洋饼干1阅读 832

使用taro+canvas实现微信小程序的图片分享功能 | 京东云技术团队

京东云开发者2阅读 367

uni-app 实现pages.json的模块加载。

只是小丑阅读 3k

是的,在这个框架满天飞的年代,我既然有有幸使用了原生小程序开发项目,除了麻烦些,倒也不是一无所获,耕耘总有收货嘛,写博客本身不是为了炫技还是什么,单纯的是记性不好,有些知识点 自己是花了时间去查找的...

HappyCodingTop1阅读 1.3k

基于微信云开发 SayLove 表白墙微信小程序V1.0
后续会继续更新,敬请期待2.0全新版本~欢迎添加右边的微信一起探讨!项目地址:[链接][其他开源项目]租房小程序 [链接]计划助手 [链接]Bug修复更新日历[2021-05-12] 更新说明:【 课设毕设参考专用版本 】针对 昵...

LiangSenCheng阅读 2.1k

5 分钟带你小程序入门 [实战总结分享]
微信小程序常常用 4 种文件类型JS 文件JS 在小程序中用于编写页面逻辑和交互效果,可调用 API 接口完成数据请求和处理,也可以使用第三方库和框架。模块化编程:小程序中JS文件可以使用ES6的模块化语法,通过expo...

程序员海军2阅读 463


云开发(Tencent CloudBase,TCB)是云端一体化的后端云服务 ,采用 serverless 架构,免去了移动应用构...

422 声望
438 粉丝