Category: Lua
-
Post Views: 18 1. Reference URL:https://www.shuijingwanwq.com/2017/01/08/1505/, the process of realizing the locking mechanism of Redis under Yii2.0, its core is to use Redis SetNX. 2. Generally speaking, after the lock is successful, the corresponding business logic is executed, and then the lock is deleted. However, if the business logic is accidentally exited for some reason, resulting in a lock but…
-
Post Views: 13 1. Request an HTTPS URL in OpenResty and report an error: Unable to get local issuer certificate. as shown in Figure 1 2. Reference URL:https://github.com/ledgetech/lua-resty-http/issues/68. client:request_uri(url, { ssl_verify = False, }). 3. Edit the request client code, add ssl_verify = False when initiated a request in lua-resty-http. as shown in Figure 2 4. Request an HTTPS URL…
-
Post Views: 14 1. Run the Lua program, and report an error: 500 Internal Server Error Openresty/1.19.9.1. as shown in Figure 1 2. Check the nginx log file, morefunresty.dev.chinamcloud.cn.error.log, modulelib.redisNot found: no field package.preload[‘lib.redis’]. as shown in Figure 2 3. Edit the nginx file and add lua_package_path to configure the file addressing path of openresty 4. After restarting the Nginx…
-
Post Views: 13 1. Error: Redis Error err for Redis Cluster, evalevalsha number of keys canT be negative or zero. as shown in Figure 1 2. Reference URL:https://developer.aliyun.com/article/645851. One of the limitations of the Lua script for the cloud Redis cluster, the call must have a key, otherwise the error message will be returned directly, “-err for redis cluster, eval/evalsha…