Internal server 500 error when my api get larger image files than 12k images.

Discussion in 'General' started by Ole Vangen, Aug 24, 2022.

  1. Ole Vangen

    Ole Vangen Member

    I have a script that gets images, and text from a software.
    Everything works fine but when the image is larger than 12k it fails and I have figure out that the response form my server is 500.

    I have been looking a bit around online and I found the suggestion to change the MaxRequestLen to a larger value , I have checked this in Ispconfig and it is already done (also confirmed in posts) Then I get a bit puzzled what to do,

    I did by a mistake some time ago and set a chown on multi directory but I have looked over all this and change owner and it seems to be ok now.
    I also updated the ispconfig3 to latest version because it might be some fix and permissions that would fix things. but there is no progress.

    I have also added the output from server.

    Would appreciate it a lot if you guys have some thoughts what this is about.

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 9.12 (stretch)
     
    [INFO] uptime:  23:16:00 up  1:32,  1 user,  load average: 1.31, 1.37, 1.39
     
    [INFO] memory:
                  total        used        free      shared  buff/cache   available
    Mem:            15G        2.7G        2.7G        772M         10G         11G
    Swap:          8.0G          0B        8.0G
     
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.8p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.0.33-57+0~20211119.61+debian9~1.gbp5d8ba5
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.0.33
    [WARN] Your php-cgi in ' . /usr/bin/php-cgi . ' seems to be outdated and might contain known exploits.
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Apache 2 (PID 362)
    [INFO] I found the following mail server(s):
        Unknown process (smtpd) (PID 2105)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 5850)
    [INFO] I found the following imap server(s):
        Dovecot (PID 5850)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 5957)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [localhost]:10024        (5831/amavisd-new)
    [localhost]:10025        (5796/master)
    [localhost]:10026        (5831/amavisd-new)
    [localhost]:10027        (5796/master)
    [anywhere]:587        (5796/master)
    [localhost]:11211        (951/memcached)
    [anywhere]:110        (5850/dovecot)
    [anywhere]:143        (5850/dovecot)
    [anywhere]:465        (5796/master)
    ***.***.***.***:53        (5997/named)
    [localhost]:53        (5997/named)
    [anywhere]:21        (5957/pure-ftpd)
    [anywhere]:22        (1063/sshd)
    [anywhere]:25        (2105/smtpd)
    [anywhere]:993        (5850/dovecot)
    [anywhere]:995        (5850/dovecot)
    [localhost]:8998        (32489/php-fpm:)
    [localhost]:8999        (32510/php-fpm:)
    [localhost]:10023        (1448/postgrey)
    *:*:*:*::*:10024        (5831/amavisd-new)
    *:*:*:*::*:10026        (5831/amavisd-new)
    *:*:*:*::*:3306        (5584/mysqld)
    *:*:*:*::*:587        (5796/master)
    [localhost]10        (5850/dovecot)
    [localhost]43        (5850/dovecot)
    *:*:*:*::*:80        (362/apache2)
    *:*:*:*::*:8080        (362/apache2)
    *:*:*:*::*:465        (5796/master)
    *:*:*:*::*:8081        (362/apache2)
    *:*:*:*::*:53        (5997/named)
    *:*:*:*::*:21        (5957/pure-ftpd)
    *:*:*:*::*:22        (1063/sshd)
    *:*:*:*::*:25        (2105/smtpd)
    *:*:*:*::*:443        (362/apache2)
    *:*:*:*::*:993        (5850/dovecot)
    *:*:*:*::*:995        (5850/dovecot)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    f2b-postfix-sasl  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 25
    f2b-dovecot  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 110,995,143,993,587,465,4190
    f2b-pure-ftpd  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 21
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain f2b-dovecot (1 references)
    target     prot opt source               destination         
    RETURN     all  --  [anywhere]/0            [anywhere]/0           
    
    Chain f2b-postfix-sasl (1 references)
    target     prot opt source               destination         
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0           
    
    Chain f2b-pure-ftpd (1 references)
    target     prot opt source               destination         
    RETURN     all  --  [anywhere]/0            [anywhere]/0           
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination         
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0           
    
    
    
    
    ##### LET'S ENCRYPT #####
    Certbot is installed in /root/.local/share/letsencrypt/bin/letsencrypt
    
    
    root@www /tmp # pico htf_report.txt
    
      GNU nano 2.7.4                                                           File: htf_report.txt                                                            Modified 
    
    
    Chain f2b-dovecot (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain f2b-postfix-sasl (1 references)
    target     prot opt source               destination
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain f2b-pure-ftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    
     
  2. Ole Vangen

    Ole Vangen Member

    Hi again , I did this crazy thing , checking the error log ;). that are inside the webxxx folder.

    I saw there that there was an error regarding permission, after googling it I also read that the temp or tmp folder needed right ownership, I changed this and now images that the app send to my script are stored without errors.
    (Normally I would expect this not to be an issue but since I previously have messed up some ownership rights this was reason)
     
    till likes this.

Share This Page