MeetYouDevs / cocoapods-imy-bin

1.06k stars 245 forks source link

MongooseError: Operation `components.findOne()` buffering timed out after 10000ms #120

Open sunjinshuai opened 3 years ago

sunjinshuai commented 3 years ago

大佬,报这种错误是因为 mongo 配置的问题吗

miroda commented 3 years ago

mongo 执行超时了,肯定是mongo数据库有问题

y2kbug commented 3 years ago

demo中mongo数据连接有点小问题,app.js用我这个试试

const Koa = require('koa')
const router = require('./server/routes')
const logger = require('koa-logger')
const mongoose = require('mongoose')
const koaBody = require('koa-body')
const app = new Koa

const DB_URL = 'mongodb://127.0.0.1:27017/binary_database'

mongoose.connect(DB_URL, { useNewUrlParser: true, useUnifiedTopology: true });
mongoose.connection.on("connected", () => {
    console.log("successfully connected to the database")
});
mongoose.connection.on("error", (error) => {
    console.log("unable to connect to the database", error)
});

//mongoose.connect(DB_URL, {useNewUrlParser: true, useUnifiedTopology: true});

app.use(koaBody({ multipart: true }))
app.use(logger())
app.use(router.routes())
app.listen(8090)
sunjinshuai commented 3 years ago

app.listen(8080) 或者自定义都可以。

sunjinshuai commented 3 years ago

[!] Error installing FMDB

[!] Error installing LKDBHelper

[!] Error installing YYModel [!] /usr/bin/curl -f -L -o /var/folders/f_/szsbbhgd5zd4jl7mdmy15jr00000gn/T/d20210213-49129-16kvpng/file.zip http://localhost:8080/frameworks/YYModel/1.0.4/zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.10.1 cocoapods-downloader/1.4.0'

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 Not Found 这种问题是 server 配置的问题么