惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
K
Kaspersky official blog
G
Google Developers Blog
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Recorded Future
Recorded Future
Blog — PlanetScale
Blog — PlanetScale
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cisco Talos Blog
Cisco Talos Blog
Latest news
Latest news
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
S
Schneier on Security
P
Palo Alto Networks Blog
H
Hacker News: Front Page
N
News and Events Feed by Topic
N
Netflix TechBlog - Medium
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
SecWiki News
SecWiki News
Cloudbric
Cloudbric
TaoSecurity Blog
TaoSecurity Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Hacker News
The Hacker News
C
Check Point Blog
L
LangChain Blog
腾讯CDC
小众软件
小众软件
T
Tenable Blog
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
About on SuperTechFans
Google Online Security Blog
Google Online Security Blog
C
Cisco Blogs
Recent Announcements
Recent Announcements
Hacker News: Ask HN
Hacker News: Ask HN
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
雷峰网
雷峰网
美团技术团队
D
DataBreaches.Net
Martin Fowler
Martin Fowler
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
博客园_首页

博客园 - 幸福的菜菜

windows下使用ACME申请SSL证书的办法 ElementPlus Radio 实现双击取消选择的效果 Windows10 LTSC版本 无法访问网络中部分的共享文件夹 SqlSugar : date绑定到XX失败,可以试着换一个类型,或者使用ORM自定义类型实现 VisualStudio Debug模式突然变慢 Visual Stadio 编译提示 The BaseOutputPath/OutputPath property is not set for project ... winform绘图与前端canvas绘图效率对比 node-sass编译不通过, 提示 “checking for Python executable "python2" in the PATH” c# async await的使用方式及为啥要用它 winform 实现对usb热拔插的监听 Wampserver 配置端口可访问服务 git credential for windows 总是弹出的问题 如何用B表的数据,更新A表的值 WampServer部署https 服务的过程 PHP 命名空间冲突解决方式 Windows下 Docker 简单部署 Django应用 C#实现后台格式化U盘的功能 Winform 实现断点续传的思路及代码 WAMPServer ServerName has syntax error 的问题(阿里云服务器上)
Laravel The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths
幸福的菜菜 · 2021-12-06 · via 博客园 - 幸福的菜菜

常见的错误就是 key 没有生成

.env 文件下    APP_KEY=   值为空。

这个很好解决,在laravel 的根目录下,执行   

即可重新生成key值

但是程序偶尔在遇到较多请求的时候,还是会报上面的错误。找了半天才发现,很可能是框架的缓存的问题

执行一次 

php artisan config:clear

php artisan config:cache

即可解决。

 特别需要留意上述命令的副作用:

php artisan config:clear 此命令会清除用户的登录信息,通常登录信息是由session,存放在redis中的

详情参见:https://learnku.com/articles/18116

php aritsan config:cache 此命令,会造成 env 失效

详情参见:https://www.cnblogs.com/songlen/p/12416627.html

复现上述错误的方式,就是使用JMeter 对Larave的某个接口发送大量请求

问题的来源:

  后端接口请求,偶尔会报500的错误。所以就查看了一下apache 的访问请求。确认过会报错之后,就看laravel 的 log,发现了标题所述的错误。

  心思:laravel 性能不会这么差吧,一定是哪里出了问题。 搜了一下才发现,把配置加载到缓存中,可以极大提升性能,就做了上述的尝试。

  使用Jmeter测试以后,发现果然没有再报错了