[ 
https://issues.apache.org/jira/browse/TS-4102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15074144#comment-15074144
 ] 

Kit Chan commented on TS-4102:
------------------------------

I still have not downloaded it and tried it out. But I took a quick look

1) we have built-in sha1/sha1_bin functions  - 
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/ts_lua.en.html#ts-sha1
But we don't have hmac functions. Not sure if it helps you or not.

2) The modules have many stuffs to pre-compute to begin with. These need to be 
executed for the 256 VMs before ATS finishes starting up. It probably just 
takes too long. https://github.com/kikito/sha1.lua/blob/master/sha1.lua#L37 . 
ATS traffic manager will try to restart the ATS if the server is not detected 
to be up and running after a while

3) You can try to increase this - 
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html#proxy-config-cop-init-sleep-time
 or decrease the number of Lua VM to see if the server will finally come up if 
you still want to use PRELOAD_CACHE. 

If you can try out the above, it would be great. Let me know if you continue to 
have problems. Then I will really try to run this live myself to take a deeper 
look.

> sha1.lua cause ts_lua dead loop
> -------------------------------
>
>                 Key: TS-4102
>                 URL: https://issues.apache.org/jira/browse/TS-4102
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Lua, Plugins
>            Reporter: James Fang
>            Assignee: Kit Chan
>             Fix For: sometime
>
>
> Requiring sha1 from https://luarocks.org/modules/kikito/sha1 
> in global hook mode would cause ts_lua to dead-loop and 100% cpu util, then 
> killed by TM & restarted.
> This creates a "start -> high cpu dead-loop -> killed" dead end.
> By chaning "local PRELOAD_CACHE = true" in sha1.lua to "local PRELOAD_CACHE = 
> false", ts_lua will started successfully.
> i am not sure if this is a bug of luajit/sha1/ts_lua, but requires sha1 from 
> bare luajit command-line without disable PRELOAD_CACHE works fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to