hosting – Fatal error: Out of memory in WordPress running on AWS EC2?

I launch an instance (EC2): Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type
all the options are default (free tier), PHP 7.3.21 (cli) (built: Aug 21 2020 23:21:45) ( NTS )
and mysql Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using EditLine wrapper

In installed WordPress 5.5.1 and run it online for testing.

I configured as bellow :
sudo vim /etc/php.ini (php.ini file)

memory_limit = 1024M

I added two lines in wp-config.php

define('FS_METHOD','direct');
define('WP_MEMORY_LIMIT', '1024M');

Using .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index.php$ - (L)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php (L)
</IfModule>
# END WordPress

<IfModule mod_php7.c>
php_value memory_limit 1024M
</IfModule>

But sometimes I still get the error messages like:

Fatal error: Out of memory (allocated 28311552) (tried to allocate
65536 bytes) in Unknown on line 0

or

Fatal error: Out of memory (allocated 24117248) (tried to allocate
143360 bytes) in file…

Does anyone know how to fix this issue? Please help?
In php.ini file I see
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
before line
memory_limit = 1024M
Is that mean even I set memory_limit = 1024M the memory limit still is 128MB on EC2?

nginx – 502 Error and *2 connect() to unix:/run/gunicorn.sock failed (2: No such file or directory) while connecting to upstream

I’ve encountered this issue on a couple of servers after routine maintenance, and I don’t know what caused them to fail. I am running Nginx, Gunicorn, and Django.

The commands I ran:

> alias please="sudo"
> please apt update
> please apt upgrade
> more ~/.config/fish/functions/update-pip.fish 
function update-pip --description "Update pip, packages, and requirements.txt"
  if ( -e requirements.txt )
    pip install -r requirements.txt -U pip

    if ( $status -ne 0 )
      return 1
    end

    pip freeze | sed s/==/>=/ > requirements.txt
  end

  return 0
end
> upgrade-pip
> please reboot

After that, I saw a 502 error (Bad Gateway).

Nginx config:

server {
    server_name example.com www.example.com;

    if ($host = www.example.com) {
        return 301 https://example.com$request_uri;
    } # managed by Certbot

    location / { 
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn.sock;
    }   

    location = /favicon.ico {
        root /home/matt/Project-Dir/staticfiles/home/img;
        #access_log off;
        #log_not_found off;
    }   
    
    location /static {
        alias /home/matt/Project-Dir/staticfiles;
    }   

    location /media {
        root /home/matt/Project-Dir/media;
    }   

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot 
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot 
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = www.example.com) {
        return 301 https://example.com$request_uri;
    } # managed by Certbot

    if ($host = example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80; 
    server_name example.com www.example.com;
    return 404; # managed by Certbot
}

Nginx error log:

2020/09/25 18:33:37 (crit) 417#417: *2 connect() to unix:/run/gunicorn.sock failed (2: No such file or directory) while connecting to upstream, client: <MY_WAN_IP>, server: example.com, request: "GET / HTTP/1.1", upstream: "http://unix:/run/gunicorn.sock:/", host: "example.com"
2020/09/25 18:33:37 (error) 417#417: *2 open() "/home/matt/Project-Dir/staticfiles/home/img/favicon.ico" failed (2: No such file or directory), client: <MY_WAN_IP>, server: example.com, request: "GET /favicon.ico HTTP/1.1", host: "example.com", referrer: "https://example.com/"
2020/09/25 18:34:11 (crit) 417#417: *2 connect() to unix:/run/gunicorn.sock failed (2: No such file or directory) while connecting to upstream, client: <MY_WAN_IP>, server: example.com, request: "GET / HTTP/1.1", upstream: "http://unix:/run/gunicorn.sock:/", host: "example.com"

How do I resolve this?

eclipse – Me pueden decir como solucionar el error de estilo que me aparece en jaspersoft

Es la primera vez que uso esta herramienta y me estaba funcionando a la perfección mi impresion de reportes pero de la nada me dejo de funcionar y me aparece un error de Style

”’net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: Could not resolve style(s): iReport.”’

macbook pro – macOS Catalina Downloading information to target volume failed ERROR

I am trying to update macOS from Yosemite (10.10) to Catalina 10.15.) on my mac book pro 2015, I downloaded the installer from the app store on my mac but every time I click continue to set up the installation I get this error message that reads “downloading installer information to the target volume failed”

I tried many solutions and searched everywhere but no solutions so far, I tried to use a patcher that also didn’t work. I tried to install it from the terminal but that also didn’t work.

What could be the cause of this?

is there a way to fix this?

python 3.x – Hola, alguien que me pueda decir mi error, el programa pide un numero y lo imprime en forma de leds, el resultado debe mostrarse en horizontal

  1. ejemplo de impresión de numeros leds

    # ### ### # # ### ### ### ### ### ### 
    #   #   # # # #   #     # # # # # # # 
    # ### ### ### ### ###   # ### ### # # 
    # #     #   #   # # #   # # #   # # # 
    # ### ###   # ### ###   # ### ### ###
    
  2. aqui almaceno en una lista cada uno de los numeros 0-9

leds=('''
###
# #
# #
# #
###''','''
  #
  #
  #
  #
  #''','''
###
  #
###
#
###''','''
###
  #
###
  #
###''','''
# #
# #
###
  #
  #''','''
###
#
###
  #
###''','''
###
#
###
# #
###''','''
###
  #
  #
  #
  #''','''
###
# #
###
# #
###''','''
###
# #
###
  #
###''')
  1. pido al usuario un numero almacenando como lista
lista = list(input('Dame un número: '))
  1. inicializo una lista que me ayudara a convertir la entrada del usuario a enteros
numeroLista=()
  1. itero cada numero en la lista del usuario, convirtiendo cada elemento a enteros de esta manera obtengo el numero a imprimir en led
for numero in lista:
    numeroLista.append(int(numero))
  1. imprimo cada digito identificado en la lista led
for digito in numeroLista:
    print(leds(digito))
  1. esta es la salida que obtengo

Dame un número: 123

  #
  #
  #
  #
  #

###
  #
###
#
###

###
  #
###
  #
###

y debería ser en horizontal, ya he probado integrar al print end=”, al igual que con strip() y no consigo obtener el resultado deseado,

Siento que mi error esta en como almacene inicialmente los patrones de los digitos en led,

ios – “unrecognized selector sent to instance” error whenever I click on a text field

Whenever I run my login screen and select a text field in the Xcode simulator I get the “unrecognized selector sent to instance”. However, this error never occurs in the first text field.here is an image of the login screen.
From everything I looked up, my understanding is that this error mainly occurs in objective-c, thus it is most likely due to something in UIKit

    import UIKit

    class signUpVC: UIViewController {

override func viewDidLoad() {
    super.viewDidLoad()
}


@IBOutlet weak var firstNameText: UITextField!

@IBOutlet weak var lastNameText: UITextField!

@IBOutlet weak var DOBPicker: UIDatePicker!

@IBOutlet weak var emailText: UITextField!

@IBOutlet weak var passwordText: UITextField!

@IBOutlet weak var confirmPassword: UITextField!

@IBOutlet weak var errorLabel: UILabel!


var error = 0
/*

 
 Errors:
    1: Not all fields are filled
    2: Password isn't secure enough
    3: Password != confirm password
*/

func checkFields() -> Int{
    // Post: checks if entire form is filled
    if firstNameText.text?.trimmingCharacters(in: .whitespacesAndNewlines) == "" ||
        lastNameText.text?.trimmingCharacters(in: .whitespacesAndNewlines) == "" ||
        emailText.text?.trimmingCharacters(in: .whitespacesAndNewlines) == "" ||
        passwordText.text?.trimmingCharacters(in: .whitespacesAndNewlines) == "" {
        error = 1
        return  error
    }
    
    // Check if the password is secure
    let cleanedPassword = passwordText.text!.trimmingCharacters(in: .whitespacesAndNewlines)
    func isPasswordValid(_ password : String) -> Bool {
        
        let passwordTest = NSPredicate(format: "SELF MATCHES %@", "^(?=.*(a-z))(A-Za-z\d$@$#!%*?&){8,}")
        //(?=.*($@$#!%*?&))
        return passwordTest.evaluate(with: password)
    }
    
    if isPasswordValid(cleanedPassword) == false {
        // Password isn't secure enough
        error = 2
        return error
    }
    
    return error
}

@IBAction func signUpButton(_ sender: UIButton) {
    let passwordCheck = passwordText.text
    let confirmCheck = confirmPassword.text
    errorLabel.isHidden = true
    if(passwordCheck == confirmCheck){
        error = checkFields()
        switch error{
        case 1:
            errorLabel.isHidden = false
            errorLabel.text = "Error: You must fill in all fields"
        case 2:
            errorLabel.isHidden = false
            errorLabel.text = "Error: password must have upper and lowercase letters"
        case 0:
            errorLabel.isHidden = true
        default:
            errorLabel.isHidden = false
        }
    }
    else{
        // Error 3
        errorLabel.isHidden = false
        errorLabel.text = "Error: Please check that your passwords match"
    }
}

}

private $query = ""; –> syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION…

Hello dear MySQL developers, i am mere user and i want to ask you if you can please let me know what is wrong in the file backend/mysql.class.php

I am asking because the script i have uploaded says this:

Line 23 is:…

private $query = ""; –> syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION…

python – Error al instalar dependencias en pipenv

Espero no ser tan obvio pero soy novato. Estoy intentando instalar scipy en pipenv pero no me permite. una de mis ideas es que como ya tengo instalado previamente pandas (e implícitamente numpy) no me permite, ya que de acuerdo a la información scipy los tiene como paquetes integrados.

Espero alguién me pueda ayudar.

windows – xFailOverCluster DSC push from one domain to another results in WinRM error

Our tfs/build server also acts as our DSC push server.
It is in domain “a” and is pushing onto servers in domain “b”. Both on different clouds.

When running the compiled .mof it instantly fails with:

##(error)The WinRM client cannot process the request. Default authentication may be used with an IP address under the following 
conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are 
provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be 
authenticated. For more information on how to set TrustedHosts run the following command: winrm help config.
    + CategoryInfo          : ConnectionError: (root/Microsoft/...gurationManager:String) (), CimException
    + FullyQualifiedErrorId : HRESULT 0x803381bb
    + PSComputerName        : <server private ip>

Trusted host is equal to * on every server.
I’m not using IP address to target nodes as it seems to be complaining about.
I’m using a self signed certificate as encryption and auth.
This works if I run the same script within the same domain.
The DNS is forwarded and works.

Any help would be much appreciated

compilação – error: linker `cc` not found ao tentar compilar arquivo .rs

Estou tentando compilar um arquivo .rust via terminal do vscode, e recebo esse erro:

causticroot@install:~/learning-rust/Book exercises/Hello world> rustc hello_world.rs 
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

Minha versão do rust e do cargo:

rustc 1.46.0 (04488afe3 2020-08-24)
cargo 1.46.0 (149022b1d 2020-07-17)

Sistema: OpenSUSE leap 15.2 – kde/plasma