在后台异步处理数据(从数据库)和存储到磁盘的最佳方法,并使其可供以后下载

需要异步下载日志,我有两个版本的项目(Server和(Hosted)Cloud) 。</ p>

当用户点击导出日志时,日志存储在数据库中,以CSV格式下载。</ p>

目前,没有办法 导出大型日志而不设置PHP内存限制。 在云启动容器中,共有30个活动线程共享4gb。 因此,日志必须在后台处理,稍后可以通过通知下载。</ p>

这些日志可能会过期,因此每隔一段时间就会清除。</ p>

解决此问题的最佳方法是什么?</ p>

技术堆栈:</ strong> </ p>

 < 代码>  -  PHP 

  • Codeigniter
  • MySQL
    </ code> </ pre>

    我已经提到这个。</ p>
    </ div>

展开原文

原文

There is a requirement to asynchronously download logs, I have two versions of the project (Server and (Hosted)Cloud).

Logs are stored in the database when the user clicks on export logs, it is downloaded in CSV format.

Currently, there is no way to export huge logs without setting a PHP memory limit. In cloud launch container is 4gb shared across 30 active threads. So, the logs have to be processed in the background and be available for download later with a notification.

There can be expiry on these logs so it's cleaned after every interval.

What could be the best approach to solve this?

Tech Stack:

- PHP
- Codeigniter
- MySQL

I have referred to this for options.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐