Restful认证问题
我正在使用此处找到的流行的宁静身份验证应用程序/教程:http://railsforum。 com/viewtopic.php?pid=74245#p74245
我一直在广泛使用该应用程序,一切都很好。我遇到的唯一问题是系统需要 60 秒到几分钟的时间来处理新用户的创建。这显然是不可接受的。
当我通过正常的注册过程创建用户时,系统只是等待并处理很长时间,然后最终返回成功的注册消息。
我没有收到任何错误或异常。日志也没有表明有什么问题。我已经广泛使用该应用程序几天了,这是我似乎遇到的唯一问题。
我应该在哪里寻找此问题的原因有什么想法吗?整个应用程序都列在我粘贴在本文顶部的链接中,因此我认为在那里查看它比我粘贴大量细节更容易。如果您需要更多信息,我很乐意回答问题。
谢谢!
I'm using the popular restful authentication app/tutorial found here: http://railsforum.com/viewtopic.php?pid=74245#p74245
I have been using the app extensively and everything works great. The only issue that I'm having is that it takes anywhere from 60 seconds to several minutes for the system to process the creation of a new user. This is obviously unacceptable.
When I create a user through the normal signup process, the system just sits and processes for a long time and then ultimately returns a successful registration message.
I'm not getting any errors or exceptions thrown. The log doesn't indicate that anything is wrong either. I've used the app extensively for a few days now and this is the single only problem that I seem to be having with it.
Any ideas where I should be looking for the cause of this problem? The entire app is listed at the link I pasted in the top of this post, so I think it's easier to take a look at it over there, rather than me pasting in a mountain of details. I'm happy to provide answers to questions if you need more info.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我会使用 newrelic gem (不用担心,将它用于开发环境是 100%自由的)。安装后,您可以注册一个用户,然后使用 newrelic 来查看每个 sql 查询花费了多长时间以及请求的哪一部分(渲染等)消耗了时间。
如果我必须做出疯狂的猜测,我会责怪邮件程序配置,但这是一个盲目的猜测。 newrelic 应该可以帮助您找出时间消耗最大的地方 - 如果 newrelic 报告中的项目之间的时间有很大的跳跃,这也是出现问题的一个很好的指标。
祝你好运。
I'd use the newrelic gem (don't worry, using it for the development environment is 100% free). With this installed, you can register a user and then use newrelic to see how long each sql query took and what part of the request (rendering, etc.) is eating up the time.
If I had to make a wild guess, I'd blame the mailer configuration, but that's a shot in the dark. newrelic should help you track down where the biggest time sinks are -and if there's a big jump in time between items in the newrelic report, that's a good indicator of where something is going wrong as well.
Good luck.
我还怀疑ActionMailer,如果它无法联系配置的服务器,则需要相当长的时间才能超时。
几年前我遇到的另一个类似问题是,我使用的代码使用 /dev/random 来获取随机数据,但我运行的虚拟机没有 /dev/random 但不知何故它最终会完成一个请求,但它花了永远。
I also suspect ActionMailer, if it can't contact the configured server it will take quite a while to timeout.
Another similar issue which I had a few years ago was that I was using code that used /dev/random to get random data but the virtual machine I was running on had no /dev/random but somehow it eventually would complete a request but it took forever.
我也会尝试使用 Rack::Bug gem。为您提供有关应用程序的大量信息,可以帮助您调试身份验证过程。
http://www.brynary.com/RackBug.mov
I would also try using Rack::Bug gem. Gives you a lot of information regarding your app that may help you debug your authentication process.
http://www.brynary.com/RackBug.mov