{"id":7452,"date":"2013-05-13T03:45:40","date_gmt":"2013-05-12T18:45:40","guid":{"rendered":"http:\/\/fukata.org\/?p=7452"},"modified":"2017-08-11T22:58:47","modified_gmt":"2017-08-11T22:58:47","slug":"lua-hiredis-close","status":"publish","type":"post","link":"https:\/\/blog.fukata.org\/archives\/7452\/","title":{"rendered":"lua-hiredis\u3067close\u3057\u3066\u3044\u308b\u306e\u306bnetstat\u3067\u78ba\u8a8d\u3059\u308b\u3068TIME_WAIT\u304c\u5927\u91cf\u767a\u751f\u3057\u3066\u3044\u305f\u4ef6"},"content":{"rendered":"
lua-hiredis<\/a>\u3092\u4f7f\u3063\u3066\u3044\u3066close\u3057\u3066\u3044\u308b\u306e\u306bab\u306730000\u4ee5\u4e0a\u30a2\u30af\u30bb\u30b9\u3055\u305b\u3066\u307f\u308b\u3068redis\u306b\u63a5\u7d9a\u51fa\u6765\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001netstat\u3067\u78ba\u8a8d\u3059\u308b\u3068redis\u3078\u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304cTIME_WAIT\u304c\u5927\u91cf\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n <\/p>\n \u3068\u3044\u3046\u3088\u3046\u306a\u7c21\u5358\u306a\u30b3\u30fc\u30c9\u3060\u3063\u305f\u3093\u3067\u3059\u304c\u3001\u3069\u3046\u3082\u3046\u307e\u304fredis\u3068\u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u5207\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u3001lua-hiredis\u306eclose\u51e6\u7406\u3092\u898b\u3066\u307f\u308b\u3068redis\u306equit\u30b3\u30de\u30f3\u30c9\u306f\u767a\u884c\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u8a66\u3057\u306b\u3001close\u306e\u524d\u306bquit\u30b3\u30de\u30f3\u30c9\u3092\u767a\u884c\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n \u3059\u308b\u3068TIME_WAIT\u304c\u5927\u91cf\u306b\u767a\u751f\u3059\u308b\u3053\u3068\u306a\u304f\u3001ab\u3067\u5927\u91cf\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u3066\u3082redis\u3078\u63a5\u7d9a\u51fa\u6765\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u73fe\u8c61\u3082\u767a\u751f\u305b\u305a\u5b89\u5b9a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" lua-hiredis\u3092\u4f7f\u3063\u3066\u3044\u3066close\u3057\u3066\u3044\u308b\u306e\u306bab\u306730000\u4ee5\u4e0a\u30a2\u30af\u30bb\u30b9\u3055\u305b\u3066\u307f\u308b\u3068redis\u306b\u63a5\u7d9a\u51fa\u6765\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001netstat\u3067\u78ba\u8a8d\u3059\u308b\u3068redis\u3078\u306e\u30b3\u30cd … \u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":9223372036854775807,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1980],"tags":[1029,1034],"_links":{"self":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/7452"}],"collection":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/comments?post=7452"}],"version-history":[{"count":0,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/7452\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media\/9223372036854775807"}],"wp:attachment":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media?parent=7452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/categories?post=7452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/tags?post=7452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\r\nlocal redis = require('hiredis')\r\nlocal conn = redis.connect('127.0.0.1', 6379)\r\n\r\nlocal hoge_value = conn:command('GET', 'Hoge')\r\n\r\nconn:close()\r\n<\/pre>\n
\r\nlocal redis = require('hiredis')\r\nlocal conn = redis.connect('127.0.0.1', 6379)\r\n\r\nlocal hoge_value = conn:command('GET', 'Hoge')\r\n\r\nconn:command('QUIT')\r\nconn:close()\r\n<\/pre>\n