pixelfed / pixelfed

Photo Sharing. For Everyone.
https://pixelfed.org
GNU Affero General Public License v3.0
5.66k stars 680 forks source link

Can't upload photos #2700

Closed stemy2 closed 3 years ago

stemy2 commented 3 years ago

Hello,

Sometimes, when i'm trying to upload a photo, it fails with no apparent reason nor any explanation outside this message:

Oops, something went wrong!
An unexpected error occurred.

It leaves no trace in the logs and i still wonder what the failed photos have in common. It's not their size, they are smaller than the MAX_PHOTO_SIZE parameter.

The images i can't post on my own instance, i can post them on the flagship instance. Did i something wrong in my config ?

## Crypto
APP_KEY=[REDACTED]

## General Settings
APP_NAME=pixelfed
APP_ENV=production
APP_DEBUG=false
APP_URL=https://pixelfed.stemy.me
ADMIN_DOMAIN="pixelfed.stemy.me"
APP_DOMAIN="pixelfed.stemy.me"
SESSION_DOMAIN="${APP_DOMAIN}"

OPEN_REGISTRATION=true
ENFORCE_EMAIL_VERIFICATION=true
PF_MAX_USERS=1000
OAUTH_ENABLED=true

APP_TIMEZONE=UTC
APP_LOCALE=en

## Pixelfed Tweaks
LIMIT_ACCOUNT_SIZE=true
MAX_ACCOUNT_SIZE=1000000000
MAX_PHOTO_SIZE=15000
MAX_AVATAR_SIZE=2000
MAX_CAPTION_LENGTH=500
MAX_BIO_LENGTH=125
MAX_NAME_LENGTH=30
MAX_ALBUM_LENGTH=4
IMAGE_QUALITY=80
PF_OPTIMIZE_IMAGES=true
PF_OPTIMIZE_VIDEOS=true
ADMIN_ENV_EDITOR=true
ACCOUNT_DELETION=true
ACCOUNT_DELETE_AFTER=false
MAX_LINKS_PER_POST=0

## Instance
#INSTANCE_DESCRIPTION=
INSTANCE_PUBLIC_HASHTAGS=false
#INSTANCE_CONTACT_EMAIL=
INSTANCE_PUBLIC_LOCAL_TIMELINE=false
#BANNED_USERNAMES=
STORIES_ENABLED=false
RESTRICTED_INSTANCE=false

## Mail
MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_FROM_ADDRESS="pixelfed@pixelfed.stemy.me"
MAIL_FROM_NAME="Pixelfed"
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

## Databases (MySQL)
#DB_CONNECTION=mysql
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=[REDACTED]
#DB_USERNAME=[REDACTED]
#DB_PASSWORD=[REDACTED]

## Databases (Postgres)
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=[REDACTED]
DB_USERNAME=[REDACTED]
DB_PASSWORD=[REDACTED]

## Cache (Redis)
REDIS_CLIENT=predis
REDIS_SCHEME=tcp
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=[REDACTED]
REDIS_PORT=6379
REDIS_DATABASE=0

## EXPERIMENTS 
EXP_LC=false
EXP_REC=false
EXP_LOOPS=false

## ActivityPub Federation
ACTIVITY_PUB=true
AP_REMOTE_FOLLOW=true
AP_INBOX=true
AP_SHAREDINBOX=true
AP_OUTBOX=true
ATOM_FEEDS=true
NODEINFO=true
WEBFINGER=true

## S3
FILESYSTEM_DRIVER=local
FILESYSTEM_CLOUD=s3
PF_ENABLE_CLOUD=false
#AWS_ACCESS_KEY_ID=
#AWS_SECRET_ACCESS_KEY=
#AWS_DEFAULT_REGION=
#AWS_BUCKET=
#AWS_URL=
#AWS_ENDPOINT=
#AWS_USE_PATH_STYLE_ENDPOINT=false

## Horizon
HORIZON_DARKMODE=false

## COSTAR - Confirm Object Sentiment Transform and Reduce
PF_COSTAR_ENABLED=true
CS_BLOCKED_DOMAINS='gab.com,gab.ai,develop.gab.com'
CS_CW_DOMAINS='switter.at'
CS_UNLISTED_DOMAINS='example.org,example.net,example.com'

# Media
MEDIA_EXIF_DATABASE=false

## Logging
LOG_CHANNEL=stack

## Image
IMAGE_DRIVER=imagick

## Broadcasting
BROADCAST_DRIVER=log  # log driver for local development

## Cache
CACHE_DRIVER=redis

## Purify
RESTRICT_HTML_TYPES=true

## Queue
QUEUE_DRIVER=redis

## Session
SESSION_DRIVER=redis

## Trusted Proxy
TRUST_PROXIES="*"

## Passport
#PASSPORT_PRIVATE_KEY=
#PASSPORT_PUBLIC_KEY=
RichardDern commented 3 years ago

I think this is caused by your php.ini rather than pixelfed's settings.

You should check upload_max_filesize.

stemy2 commented 3 years ago

I think this is caused by your php.ini rather than pixelfed's settings.

You should check upload_max_filesize.

You were right, thanks.