'Why excel file cant download at server.?

I am using golang as programming language ,I have a last 100 days of data need to dowload as excel (which is big amount 40mb) and I saved that to redis server. when I want to download that data(used hash to get the saved data from redis) as excel or csv.server shows 502 bad gate way.

I am confused that same data is download when it runs as in localhost, but unable to download at server.

When I check the server log,it gives me a clue about time out.

Is there any way to resolve this.

note : server 502 bad gate way shows at when rendering large data.if the data is less its working fine.

can anybody help to solve this problem.

Thank you in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source